本文整理汇总了PHP中Modules::checkTranslations方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::checkTranslations方法的具体用法?PHP Modules::checkTranslations怎么用?PHP Modules::checkTranslations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules
的用法示例。
在下文中一共展示了Modules::checkTranslations方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Verzending België', 'description' => '', 'zone' => '', 'quote' => '10', 'order_status_id' => '3', 'sort_order' => '10');
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
description VARCHAR(255),
zone VARCHAR(255),
quote FLOAT(10,2),
order_status_id INT(11),
sort_order INT(11))');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_query('CREATE INDEX zone ON checkout_' . get_class($this) . ' (`zone`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}
示例2: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Facturatieadres', 'description' => '');
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
description VARCHAR(255))');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}
示例3: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'login' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'create_account' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'change_billing_address' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'billing_name' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Naam + Familienaam', 'dbvalue' => 'entry_firstname', 'expression' => "/^[\\D]+[\\s][\\D]+\$/", 'error' => 'Vul a.u.b. een volledige naam in.', 'sort_order' => 1), 'billing_company' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Bedrijf', 'dbvalue' => 'entry_company', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 2), 'billing_tva_intracom' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'BTW nr.', 'dbvalue' => 'billing_tva_intracom', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 3), 'billing_street_address' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Straat + nr.', 'dbvalue' => 'entry_street_address', 'expression' => "/^[\\D]+[\\s][\\d]+[\\D]{0,3}+\$/", 'error' => 'Vul a.u.b. een straat + nummer in.', 'sort_order' => 4), 'billing_city' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Gemeente', 'dbvalue' => 'entry_city', 'expression' => "/^[\\D]+[\\s]?[\\D]*\$/", 'error' => 'Vul a.u.b. een gemeente in.', 'sort_order' => 5), 'billing_postcode' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Postcode', 'dbvalue' => 'entry_postcode', 'expression' => "/^[a-zA-Z0-9]+\$/", 'error' => 'Vul a.u.b. een postcode in.', 'sort_order' => 6), 'billing_country' => array('type' => 'dropdown', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Land', 'dbvalue' => 'entry_country_id', 'expression' => "/^[1-9][0-9]*\$/", 'error' => 'Kies a.u.b. een land.', 'sort_order' => 7), 'customers_telephone' => array('type' => 'field', 'input' => 'tel', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Tel.', 'dbvalue' => 'customers_telephone', 'function' => "validate_phone", 'error' => 'Vul a.u.b. een telefoon nummer in.', 'sort_order' => 8), 'customers_email_address' => array('type' => 'field', 'input' => 'email', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'E-mailadres', 'dbvalue' => 'customers_email_address', 'function' => "validate_email", 'error' => 'Vul a.u.b. een geldig e-mail adres in.', 'sort_order' => 9), 'delivery_name' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Naam + Familienaam', 'dbvalue' => 'entry_firstname', 'expression' => "/^[\\D]+[\\s][\\D]+\$/", 'error' => 'Vul a.u.b. een volledige naam in.', 'sort_order' => 1), 'delivery_company' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Bedrijf', 'dbvalue' => 'entry_company', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 2), 'delivery_tva_intracom' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'BTW nr.', 'dbvalue' => '', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 3), 'delivery_street_address' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Straat + nr.', 'dbvalue' => 'entry_street_address', 'expression' => "/^[\\D]+[\\s][\\d]+[\\D]{0,3}+\$/", 'error' => 'Vul a.u.b. een straat + nummer in.', 'sort_order' => 4), 'delivery_city' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Gemeente', 'dbvalue' => 'entry_city', 'expression' => "/^[\\D]+[\\s]?[\\D]*\$/", 'error' => 'Vul a.u.b. een gemeente in.', 'sort_order' => 5), 'delivery_postcode' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Postcode', 'dbvalue' => 'entry_postcode', 'expression' => "/^[a-zA-Z0-9]+\$/", 'error' => 'Vul a.u.b. een postcode in.', 'sort_order' => 6), 'delivery_country' => array('type' => 'dropdown', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Land', 'dbvalue' => 'entry_country_id', 'expression' => "/^[1-9][0-9]*\$/", 'error' => 'Kies a.u.b. een land.', 'sort_order' => 7));
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
`id` INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
`name` VARCHAR(255),
`type` VARCHAR(255),
`input` VARCHAR(255),
`value` VARCHAR(255),
`options` VARCHAR(255),
`block` VARCHAR(255),
`label` VARCHAR(255),
`dbvalue` VARCHAR(255),
`expression` VARCHAR(255),
`function` VARCHAR(255),
`condition` VARCHAR(255),
`error` VARCHAR(255),
`sort_order` INT(11))');
tep_db_query('CREATE INDEX name ON checkout_' . get_class($this) . ' (name)');
tep_db_query('CREATE INDEX type ON checkout_' . get_class($this) . ' (type)');
foreach ($install_array as $key => $value) {
$db_array = array();
$db_array['name'] = $key;
foreach ($value as $name => $data) {
if (is_array($data)) {
$data = serialize($data);
}
$db_array[$name] = $data;
}
tep_db_perform('checkout_' . get_class($this), $db_array, 'insert');
}
}
示例4: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Kiala', 'description' => '', 'dspid' => '', 'min_amount' => '0', 'max_weight' => '0', 'free_shipping_over' => '0', 'shipping_cost' => '0', 'sort_order' => 10);
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
description VARCHAR(255),
dspid VARCHAR(255),
min_amount FLOAT(10,2),
max_weight FLOAT(10,2),
free_shipping_over FLOAT(10,2),
shipping_cost FLOAT(10,2),
sort_order INT(11))');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_query('CREATE INDEX sort_order ON checkout_' . get_class($this) . ' (`sort_order`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}
示例5: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Betaling via beveiligde Ogone server', 'description' => '', 'zone' => '*', 'order_status_id' => '1', 'shipping_module' => '*', 'pspid' => '', 'sha_string' => '', 'mode' => 'test', 'method_images' => '');
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
description VARCHAR(255),
zone VARCHAR(255),
order_status_id INT(11),
shipping_module VARCHAR(255),
pspid VARCHAR(255),
sha_string VARCHAR(255),
mode VARCHAR(255),
method_images TEXT)');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_query('CREATE INDEX zone ON checkout_' . get_class($this) . ' (`zone`)');
tep_db_query('CREATE INDEX shipping_module ON checkout_' . get_class($this) . ' (`shipping_module`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}
示例6: __construct
public function __construct($show_step = true)
{
global $Modules, $temp_orders_id, $cart;
if (isset($_GET['install'])) {
//check if all translations are available for checkout
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
parent::addCron($min = '0', $hour = '4', $dayOfMonth = '1', $month = '*', $dayOfWeek = '*', $cmd = '/usr/bin/php -q ' . dirname(__FILE__) . '/assets/cron/cron.php');
}
$this->modules = $Modules->modules;
$goto_next_step = true;
$errors = array();
if ($temp_orders_id == 0 && $show_step === true) {
//create order in db
$temp_orders_id = $this->create_order();
} else {
if (basename($_SERVER['HTTP_REFERER']) == 'shopping_cart.php') {
$this->add_products_to_db(false);
}
}
if (isset($_POST['checkout_modules'])) {
//process all modules from filled in step
foreach ($_POST['checkout_modules'] as $module) {
global ${$module};
$answer = ${$module}->process_data();
if (count(${$module}->errors) > 0) {
self::$errors = array_merge(self::$errors, ${$module}->errors);
}
if ($answer !== true) {
$goto_next_step = false;
}
}
}
//Check if we comeback from a payment site
foreach ($this->modules as $type => $typedata) {
foreach ($typedata as $module) {
global ${$module};
if (method_exists(${$module}, 'after_extern_process')) {
${$module}->after_extern_process();
}
}
}
//get step if given
if (isset($_POST['checkout_step'])) {
$getstep = $_POST['checkout_step'];
if ($_POST['checkout_step'] == $this->last_active_step() && count(self::$errors) == 0) {
//last step is processed and there were no errors
tep_db_query('INSERT INTO temp_orders_steps (orders_id, step, status, errors) VALUES("' . $temp_orders_id . '", "' . $getstep . '", "1", "' . addslashes(serialize(self::$errors)) . '")');
$query = tep_db_query('SELECT payment_method FROM temp_orders WHERE orders_id = "' . $temp_orders_id . '"');
$orders_array = tep_db_fetch_array($query);
$instance_id = end(explode('_', $orders_array['payment_method']));
$payment_method = substr($orders_array['payment_method'], 0, -(strlen($instance_id) + 1));
//Check if modules need processing before confirm
foreach ($this->modules as $type => $typedata) {
foreach ($typedata as $module) {
if ($module == $payment_method) {
global ${$module};
if (method_exists(${$module}, 'before_confirm')) {
${$module}->before_confirm();
}
if (method_exists(${$module}, 'after_confirm')) {
$module_error = ${$module}->after_confirm();
if (count($module_error) > 0) {
self::$errors = array_merge(self::$errors, $module_error);
}
}
}
}
}
if (count(self::$errors) == 0) {
//put data from temp to right db tables
$this->get_all_data_from_temp_db($temp_orders_id);
$orders_id = $this->put_all_data_in_db($temp_orders_id);
//process with orders id
foreach ($this->modules as $type => $typedata) {
foreach ($typedata as $module) {
global ${$module};
if (method_exists(${$module}, 'after_process')) {
${$module}->after_process($orders_id);
}
}
}
//send mail to customer and shop owner
$this->send_order_mail($orders_id);
$cart->reset(true);
setcookie('temp_orders_id', '', time() - 3600, '/');
tep_redirect(tep_href_link('checkout_success.php'));
}
}
}
if ($temp_orders_id > 0) {
if (basename($_SERVER['HTTP_REFERER']) == 'shopping_cart.php') {
$last_step = $this->next_active_step('');
} else {
$last_step_data = $this->last_filled_in_step($temp_orders_id);
$last_step = $last_step_data['step'];
}
}
//if step is asked through get param, force this.
//first check if step is available => don't skip steps
if (isset($_GET['force_checkout_step'])) {
//.........这里部分代码省略.........
示例7: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Betaling via beveiligde Europabank server', 'description' => '', 'zone' => '*', 'order_status_id' => '2', 'shipping_module' => '*', 'account_number' => '', 'shared_secret' => '', 'mpi_url' => 'https://www.ebonline.be/test/mpi/authenticate', 'redirect_type' => 'DIRECT', 'min_amount' => '0', 'max_amount' => '999999');
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
description VARCHAR(255),
zone VARCHAR(255),
order_status_id INT(11),
shipping_module VARCHAR(255),
account_number VARCHAR(255),
shared_secret VARCHAR(255),
mpi_url VARCHAR(255),
redirect_type VARCHAR(255),
min_amount FLOAT(10,2),
max_amount FLOAT(10,2))');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_query('CREATE INDEX zone ON checkout_' . get_class($this) . ' (`zone`)');
tep_db_query('CREATE INDEX shipping_module ON checkout_' . get_class($this) . ' (`shipping_module`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}
示例8: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => 'true', 'title' => 'Betaling via overschrijving', 'short_description' => 'Van zodra wij uw betaling ontvangen hebben verzenden we uw bestelling.', 'description' => 'STORE_NAME' . "\n" . 'STORE_STREET_ADDRESS' . "\n" . 'STORE_POSTCODE STORE_CITY' . "\n" . 'tep_get_country_name(STORE_COUNTRY_ID)' . "\n" . 'Translate(\'BTW nr\'): STORE_BTW' . "\n" . 'Translate(\'Rek. nr\'): STORE_REKENINGNR', 'zone' => '*', 'order_status_id' => '3', 'shipping_module' => '*');
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
status VARCHAR(255),
title VARCHAR(255),
short_description VARCHAR(255),
description VARCHAR(255),
zone VARCHAR(255),
order_status_id INT(11),
shipping_module VARCHAR(255))');
tep_db_query('CREATE INDEX title ON checkout_' . get_class($this) . ' (`title`)');
tep_db_query('CREATE INDEX status ON checkout_' . get_class($this) . ' (`status`)');
tep_db_query('CREATE INDEX zone ON checkout_' . get_class($this) . ' (`zone`)');
tep_db_query('CREATE INDEX shipping_module ON checkout_' . get_class($this) . ' (`shipping_module`)');
tep_db_perform('checkout_' . get_class($this), $install_array, 'insert');
}