本文整理汇总了PHP中Checkout::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::instance方法的具体用法?PHP Checkout::instance怎么用?PHP Checkout::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::instance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: glob
//load all module files so that they can be used from $_SESSION
// @TODO delete this in cms 2.0 and find better way
// this has to be loaded before application_top because session vars needs the files for class definition
if (is_dir(DIR_FS_CATALOG . 'includes/modules/checkout/modules/Icepay')) {
$object = glob(DIR_FS_CATALOG . 'includes/modules/checkout/modules/Icepay/*_module.php');
require_once $object[0];
}
$temp_orders_id = $_POST['Reference'];
// @TODO End Of Delete
require_once 'includes/application_top.php';
$Analytics = new Analytics();
if (!is_object($Modules)) {
//start modules class
$Modules = new Modules();
}
$Checkout = Checkout::instance(false);
$temp_data = $Checkout->get_all_data_from_temp_db($temp_orders_id);
//get all orders data
$icepay = new Icepay_Postback();
$icepay->setMerchantID($Icepay->instances[$temp_data[$temp_orders_id]['orders']['payment_method']]['merchant_id'])->setSecretCode($Icepay->instances[$temp_data[$temp_orders_id]['orders']['payment_method']]['secret_code'])->enableLogging()->logToFile(true, realpath("../logs"))->logToScreen();
$data = '';
foreach ($_POST as $key => $value) {
$data .= $key . ': ' . "\n";
$data .= $value . "\n\n";
}
tep_db_query('INSERT INTO payment_log (type, data, date) VALUES ("Icepay", "' . $data . '", NOW())');
tep_db_query('DELETE FROM payment_log WHERE date < DATE_SUB(NOW(), INTERVAL 30 DAY)');
try {
if ($icepay->validate()) {
if ($temp_data[$temp_orders_id]['orders']['processed_order_id'] > 0) {
//Update order status
示例2: tep_db_perform
tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array1);
$address_id = tep_db_insert_id();
tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int) $address_id . "' where customers_id = '" . (int) $customer_id . "'");
tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $customer_id . "', '0', now())");
}
?>
<?php
}
// nikhil
?>
</div>
</div>
<div class="row">
<div class="span8">
<?php
$Checkout = Checkout::instance();
?>
</div>
<div class="span4 active summary">
<div class="step_title"><?php
echo Translate('Overzicht');
?>
</div>
<?php
foreach (Checkout::$checkout_steps['summary']['modules'] as $type) {
foreach ($Modules->modules[$type] as $module) {
echo ${$module}->output();
}
}
?>
<a href="<?php
示例3: instance
static function instance($show_step = true)
{
if (!self::$instance) {
self::$instance = new Checkout($show_step);
}
return self::$instance;
}