本文整理汇总了PHP中osCommerce\OM\Core\Registry类的典型用法代码示例。如果您正苦于以下问题:PHP Registry类的具体用法?PHP Registry怎么用?PHP Registry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Registry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
public static function execute($data) {
$OSCOM_PDO = Registry::get('PDO');
$sql_query = 'select l.*, (select count(*) from :table_languages_definitions ld where ld.languages_id = l.languages_id) as total_definitions from :table_languages l where';
if ( is_numeric($data['id']) ) {
$sql_query .= ' l.languages_id = :languages_id';
} else {
$sql_query .= ' l.code = :code';
}
$sql_query .= ' limit 1';
$Qlanguage = $OSCOM_PDO->prepare($sql_query);
if ( is_numeric($data['id']) ) {
$Qlanguage->bindInt(':languages_id', $data['id']);
} else {
$Qlanguage->bindValue(':code', $data['id']);
}
$Qlanguage->execute();
return $Qlanguage->fetch();
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:25,代码来源:Get.php
示例2: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Shipping = Registry::get('Shipping');
$OSCOM_ShoppingCart = Registry::get('ShoppingCart');
if (!empty($_POST['comments'])) {
$_SESSION['comments'] = HTML::sanitize($_POST['comments']);
}
if ($OSCOM_Shipping->hasQuotes()) {
if (isset($_POST['shipping_mod_sel']) && strpos($_POST['shipping_mod_sel'], '_')) {
list($module, $method) = explode('_', $_POST['shipping_mod_sel']);
if (Registry::exists('Shipping_' . $module) && Registry::get('Shipping_' . $module)->isEnabled()) {
$quote = $OSCOM_Shipping->getQuote($_POST['shipping_mod_sel']);
if (isset($quote['error'])) {
$OSCOM_ShoppingCart->resetShippingMethod();
} else {
$OSCOM_ShoppingCart->setShippingMethod($quote);
OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
}
} else {
$OSCOM_ShoppingCart->resetShippingMethod();
}
}
} else {
$OSCOM_ShoppingCart->resetShippingMethod();
OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
}
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:27,代码来源:Process.php
示例3: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Database = Registry::get('Database');
$OSCOM_MessageStack = Registry::get('MessageStack');
$Qcheck = $OSCOM_Database->query('select customers_id, customers_firstname, customers_lastname, customers_gender, customers_email_address, customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
$Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
$Qcheck->execute();
if ($Qcheck->numberOfRows() === 1) {
$password = osc_create_random_string(ACCOUNT_PASSWORD);
if (Account::savePassword($password, $Qcheck->valueInt('customers_id'))) {
if (ACCOUNT_GENDER > -1) {
if ($Qcheck->value('customers_gender') == 'm') {
$email_text = sprintf(OSCOM::getDef('email_addressing_gender_male'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
} else {
$email_text = sprintf(OSCOM::getDef('email_addressing_gender_female'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
} else {
$email_text = sprintf(OSCOM::getDef('email_addressing_gender_unknown'), $Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
$email_text .= sprintf(OSCOM::getDef('email_password_reminder_body'), osc_get_ip_address(), STORE_NAME, $password, STORE_OWNER_EMAIL_ADDRESS);
osc_email($Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname'), $Qcheck->valueProtected('customers_email_address'), sprintf(OSCOM::getDef('email_password_reminder_subject'), STORE_NAME), $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$OSCOM_MessageStack->add('LogIn', OSCOM::getDef('success_password_forgotten_sent'), 'success');
}
osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
} else {
$OSCOM_MessageStack->add('PasswordForgotten', OSCOM::getDef('error_password_forgotten_no_email_address_found'));
}
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:28,代码来源:Process.php
示例4: install
public function install()
{
$OSCOM_Database = Registry::get('Database');
parent::install();
$OSCOM_Database->simpleQuery("insert into :table_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum Entries To Display', 'MODULE_CONTENT_UPCOMING_PRODUCTS_MAX_DISPLAY', '10', 'Maximum number of upcoming products to display', '6', '0', now())");
$OSCOM_Database->simpleQuery("insert into :table_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cache Contents', 'MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE', '1440', 'Number of minutes to keep the contents cached (0 = no cache)', '6', '0', now())");
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:Controller.php
示例5: execute
public static function execute($data)
{
$OSCOM_Database = Registry::get('PDO');
$OSCOM_Database->beginTransaction();
$Qlanguage = $OSCOM_Database->prepare('update :table_languages set name = :name, code = :code, locale = :locale, charset = :charset, date_format_short = :date_format_short, date_format_long = :date_format_long, time_format = :time_format, text_direction = :text_direction, currencies_id = :currencies_id, numeric_separator_decimal = :numeric_separator_decimal, numeric_separator_thousands = :numeric_separator_thousands, parent_id = :parent_id, sort_order = :sort_order where languages_id = :languages_id');
$Qlanguage->bindValue(':name', $data['name']);
$Qlanguage->bindValue(':code', $data['code']);
$Qlanguage->bindValue(':locale', $data['locale']);
$Qlanguage->bindValue(':charset', $data['charset']);
$Qlanguage->bindValue(':date_format_short', $data['date_format_short']);
$Qlanguage->bindValue(':date_format_long', $data['date_format_long']);
$Qlanguage->bindValue(':time_format', $data['time_format']);
$Qlanguage->bindValue(':text_direction', $data['text_direction']);
$Qlanguage->bindInt(':currencies_id', $data['currencies_id']);
$Qlanguage->bindValue(':numeric_separator_decimal', $data['numeric_separator_decimal']);
$Qlanguage->bindValue(':numeric_separator_thousands', $data['numeric_separator_thousands']);
$Qlanguage->bindInt(':parent_id', $data['parent_id']);
$Qlanguage->bindInt(':sort_order', $data['sort_order']);
$Qlanguage->bindInt(':languages_id', $data['id']);
$Qlanguage->execute();
if (!$Qlanguage->isError()) {
if ($data['set_default'] === true) {
$Qupdate = $OSCOM_Database->prepare('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
$Qupdate->bindValue(':configuration_value', $data['code']);
$Qupdate->bindValue(':configuration_key', 'DEFAULT_LANGUAGE');
$Qupdate->execute();
}
$OSCOM_Database->commit();
return true;
}
$OSCOM_Database->rollBack();
return false;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:33,代码来源:Update.php
示例6: execute
public static function execute($data)
{
$OSCOM_Database = Registry::get('PDO');
$result = array();
$sql_query = 'select SQL_CALC_FOUND_ROWS c.*, count(z.zone_id) as total_zones from :table_countries c left join :table_zones z on (c.countries_id = z.zone_country_id) where (c.countries_name like :countries_name or c.countries_iso_code_2 like :countries_iso_code_2 or c.countries_iso_code_3 like :countries_iso_code_3 or z.zone_name like :zone_name or z.zone_code like :zone_code) group by c.countries_id order by c.countries_name';
if ($data['batch_pageset'] !== -1) {
$sql_query .= ' limit :batch_pageset, :batch_max_results';
}
$sql_query .= '; select found_rows();';
$Qcountries = $OSCOM_Database->prepare($sql_query);
$Qcountries->bindValue(':countries_name', '%' . $data['keywords'] . '%');
$Qcountries->bindValue(':countries_iso_code_2', '%' . $data['keywords'] . '%');
$Qcountries->bindValue(':countries_iso_code_3', '%' . $data['keywords'] . '%');
$Qcountries->bindValue(':zone_name', '%' . $data['keywords'] . '%');
$Qcountries->bindValue(':zone_code', '%' . $data['keywords'] . '%');
if ($data['batch_pageset'] !== -1) {
$Qcountries->bindInt(':batch_pageset', $OSCOM_Database->getBatchFrom($data['batch_pageset'], $data['batch_max_results']));
$Qcountries->bindInt(':batch_max_results', $data['batch_max_results']);
}
$Qcountries->execute();
$result['entries'] = $Qcountries->fetchAll();
$Qcountries->nextRowset();
$result['total'] = $Qcountries->fetchColumn();
return $result;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:25,代码来源:Find.php
示例7: execute
public static function execute($data) {
$OSCOM_PDO = Registry::get('PDO');
$result = array();
$sql_query = 'select * from :table_customers where ';
if ( isset($data['email_address']) ) {
$sql_query .= 'customers_email_address = :customers_email_address';
} else {
$sql_query .= 'customers_id = :customers_id';
}
$Qcustomer = $OSCOM_PDO->prepare($sql_query);
if ( isset($data['email_address']) ) {
$Qcustomer->bindValue(':customers_email_address', $data['email_address']);
} else {
$Qcustomer->bindInt(':customers_id', $data['id']);
}
$Qcustomer->execute();
if ( $Qcustomer->fetch() !== false ) {
$result = $Qcustomer->toArray();
$result['customers_name'] = $result['customers_firstname'] . ' ' . $result['customers_lastname'];
}
return $result;
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:31,代码来源:Get.php
示例8: start
public static function start()
{
$OSCOM_Service = Registry::get('Service');
Registry::set('RecentlyVisited', new RecentlyVisitedClass());
$OSCOM_Service->addCallBeforePageContent('RecentlyVisited', 'initialize');
return true;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:RecentlyVisited.php
示例9: execute
public static function execute() {
$OSCOM_PDO = Registry::get('PDO');
$result = $OSCOM_PDO->query('show server_version')->fetch();
return 'PostgreSQL v' . $result['server_version'];
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:7,代码来源:GetVersion.php
示例10: execute
public static function execute($data) {
$OSCOM_PDO = Registry::get('PDO');
$sql_query = 'select * from :table_currencies where';
if ( is_numeric($data['id']) ) {
$sql_query .= ' currencies_id = :currencies_id';
} else {
$sql_query .= ' code = :code';
}
$sql_query .= ' limit 1';
$Qcurrency = $OSCOM_PDO->prepare($sql_query);
if ( is_numeric($data['id']) ) {
$Qcurrency->bindInt(':currencies_id', $data['id']);
} else {
$Qcurrency->bindValue(':code', $data['id']);
}
$Qcurrency->execute();
return $Qcurrency->fetch();
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:25,代码来源:Get.php
示例11: initialize
public function initialize()
{
$OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null;
$OSCOM_PDO = Registry::get('PDO');
$OSCOM_Language = Registry::get('Language');
if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) {
$Qmanufacturer = $OSCOM_PDO->query('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
$Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getID());
$Qmanufacturer->bindInt(':products_id', $OSCOM_Product->getID());
$Qmanufacturer->execute();
$result = $Qmanufacturer->fetch();
if (!empty($result)) {
$this->_content = '';
if (strlen($result['manufacturers_image']) > 0) {
$this->_content .= '<div style="text-align: center;">' . HTML::link(OSCOM::getLink(null, 'Index', 'Manufacturers=' . $result['manufacturers_id']), HTML::image('public/manufacturers/' . $result['manufacturers_image'], $result['manufacturers_name'])) . '</div>';
}
$this->_content .= '<ol style="list-style: none; margin: 0; padding: 0;">';
if (strlen($result['manufacturers_url']) > 0) {
$this->_content .= '<li>' . HTML::link(OSCOM::getLink(null, 'Redirct', 'Manufacturer=' . $result['manufacturers_id']), sprintf(OSCOM::getDef('box_manufacturer_info_website'), $result['manufacturers_name']), 'target="_blank"') . '</li>';
}
$this->_content .= '<li>' . HTML::link(OSCOM::getLink(null, 'Index', 'Manufacturers=' . $result['manufacturers_id']), OSCOM::getDef('box_manufacturer_info_products')) . '</li>';
$this->_content .= '</ol>';
}
}
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:25,代码来源:Controller.php
示例12: uninstall
public function uninstall() {
$OSCOM_PDO = Registry::get('PDO');
$error = false;
$OSCOM_PDO->beginTransaction();
$Qdelete = $OSCOM_PDO->prepare('delete from :table_product_attributes where id = :id');
$Qdelete->bindInt(':id', $this->getID());
$Qdelete->execute();
if ( $Qdelete->isError() ) {
$error = true;
}
if ( $error === false ) {
$Quninstall = $OSCOM_PDO->prepare('delete from :table_templates_boxes where code = :code and modules_group = :modules_group');
$Quninstall->bindValue(':code', $this->getCode());
$Quninstall->bindValue(':modules_group', 'ProductAttribute');
$Quninstall->execute();
if ( $Quninstall->isError() ) {
$error = true;
}
}
if ( $error === false ) {
$OSCOM_PDO->commit();
} else {
$OSCOM_PDO->rollBack();
}
return ( $error === false );
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:34,代码来源:ProductAttributeModuleAbstract.php
示例13: execute
public static function execute($data) {
$OSCOM_PDO = Registry::get('PDO');
$result = array();
$sql_query = 'select * from :table_administrators order by user_name';
if ( $data['batch_pageset'] !== -1 ) {
$sql_query .= ' limit :batch_max_results offset :batch_pageset';
}
$Qadmins = $OSCOM_PDO->prepare($sql_query);
if ( $data['batch_pageset'] !== -1 ) {
$Qadmins->bindInt(':batch_pageset', $OSCOM_PDO->getBatchFrom($data['batch_pageset'], $data['batch_max_results']));
$Qadmins->bindInt(':batch_max_results', $data['batch_max_results']);
}
$Qadmins->execute();
$result['entries'] = $Qadmins->fetchAll();
$Qtotal = $OSCOM_PDO->query('select count(*) from :table_administrators');
$Qtotal->execute();
$result['total'] = $Qtotal->fetchColumn();
return $result;
}
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:29,代码来源:GetAll.php
示例14: execute
public static function execute($data)
{
$OSCOM_PDO = Registry::get('PDO');
if (isset($data['key']) && isset($data['value'])) {
$data = array($data);
}
$error = false;
$in_transaction = false;
if (count($data) > 1) {
$OSCOM_PDO->beginTransaction();
$in_transaction = true;
}
$Qcfg = $OSCOM_PDO->prepare('update :table_configuration set configuration_value = :configuration_value, last_modified = now() where configuration_key = :configuration_key');
foreach ($data as $d) {
$Qcfg->bindValue(':configuration_value', $d['value']);
$Qcfg->bindValue(':configuration_key', $d['key']);
$Qcfg->execute();
if ($Qcfg->isError()) {
if ($in_transaction === true) {
$OSCOM_PDO->rollBack();
}
$error = true;
break;
}
}
if ($error === false && $in_transaction === true) {
$OSCOM_PDO->commit();
}
return !$error;
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:30,代码来源:UpdateConfigurationParameters.php
示例15: execute
public static function execute($data)
{
$OSCOM_Database = Registry::get('PDO');
$OSCOM_Database->beginTransaction();
if (is_numeric($data['id'])) {
$Qcurrency = $OSCOM_Database->prepare('update :table_currencies set title = :title, code = :code, symbol_left = :symbol_left, symbol_right = :symbol_right, decimal_places = :decimal_places, value = :value where currencies_id = :currencies_id');
$Qcurrency->bindInt(':currencies_id', $data['id']);
} else {
$Qcurrency = $OSCOM_Database->prepare('insert into :table_currencies (title, code, symbol_left, symbol_right, decimal_places, value) values (:title, :code, :symbol_left, :symbol_right, :decimal_places, :value)');
}
$Qcurrency->bindValue(':title', $data['title']);
$Qcurrency->bindValue(':code', $data['code']);
$Qcurrency->bindValue(':symbol_left', $data['symbol_left']);
$Qcurrency->bindValue(':symbol_right', $data['symbol_right']);
$Qcurrency->bindInt(':decimal_places', $data['decimal_places']);
$Qcurrency->bindValue(':value', $data['value']);
$Qcurrency->execute();
if (!$Qcurrency->isError()) {
if ($data['set_default'] === true) {
$Qupdate = $OSCOM_Database->prepare('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
$Qupdate->bindValue(':configuration_value', $data['code']);
$Qupdate->bindValue(':configuration_key', 'DEFAULT_CURRENCY');
$Qupdate->execute();
}
$OSCOM_Database->commit();
return true;
}
$OSCOM_Database->rollBack();
return false;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:30,代码来源:Save.php
示例16: __construct
public function __construct()
{
$OSCOM_Language = Registry::get('Language');
$OSCOM_Language->loadIniFile('modules/services/language.php');
$this->title = OSCOM::getDef('services_language_title');
$this->description = OSCOM::getDef('services_language_description');
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:Language.php
示例17: install
public function install()
{
$OSCOM_PDO = Registry::get('PDO');
parent::install();
$OSCOM_PDO->exec("insert into :table_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Random Product Specials Selection', 'BOX_SPECIALS_RANDOM_SELECT', '10', 'Select a random product on special from this amount of the newest products on specials available', '6', '0', now())");
$OSCOM_PDO->exec("insert into :table_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cache Contents', 'BOX_SPECIALS_CACHE', '1', 'Number of minutes to keep the contents cached (0 = no cache)', '6', '0', now())");
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Controller.php
示例18: initialize
public function initialize()
{
$OSCOM_ShoppingCart = Registry::get('ShoppingCart');
$OSCOM_Template = Registry::get('Template');
$steps = array();
if ($OSCOM_ShoppingCart->getContentType() != 'virtual') {
$steps[] = array('title' => OSCOM::getDef('box_ordering_steps_delivery'), 'code' => 'shipping', 'active' => $OSCOM_Template->getModule() == 'Shipping' || $OSCOM_Template->getModule() == 'ShippingAddress' ? true : false);
}
$steps[] = array('title' => OSCOM::getDef('box_ordering_steps_payment'), 'code' => 'payment', 'active' => $OSCOM_Template->getModule() == 'Payment' || $OSCOM_Template->getModule() == 'PaymentAddress' ? true : false);
$steps[] = array('title' => OSCOM::getDef('box_ordering_steps_confirmation'), 'code' => 'confirmation', 'active' => $OSCOM_Template->getModule() == 'Confirmation' ? true : false);
$steps[] = array('title' => OSCOM::getDef('box_ordering_steps_complete'), 'active' => $OSCOM_Template->getModule() == 'Success' ? true : false);
$content = osc_image('templates/' . $OSCOM_Template->getCode() . '/images/icons/32x32/checkout_preparing_to_ship.gif') . '<br />';
$counter = 0;
foreach ($steps as $step) {
$counter++;
$content .= '<span style="white-space: nowrap;"> ' . osc_image('templates/' . $OSCOM_Template->getCode() . '/images/icons/24x24/checkout_' . $counter . ($step['active'] === true ? '_on' : '') . '.gif', $step['title'], 24, 24, 'align="absmiddle"');
if (isset($step['code'])) {
$content .= osc_link_object(OSCOM::getLink(null, 'Checkout', $step['code'], 'SSL'), $step['title'], 'class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '"');
} else {
$content .= '<span class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '">' . $step['title'] . '</span>';
}
$content .= '</span><br />';
}
$content .= osc_image('templates/' . $OSCOM_Template->getCode() . '/images/icons/32x32/checkout_ready_to_ship.gif');
$this->_content = $content;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:26,代码来源:Controller.php
示例19: install
public function install()
{
$OSCOM_Database = Registry::get('Database');
parent::install();
$OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1', 'osc_cfg_set_boolean_value(array(\\'true\\', \\'false\\'))', now())");
$OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:Total.php
示例20: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_ShoppingCart = Registry::get('ShoppingCart');
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Template = Registry::get('Template');
global $osC_oiAddress;
// HPDL
$application->setPageTitle(OSCOM::getDef('payment_method_heading'));
$application->setPageContent('billing.php');
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_payment'), OSCOM::getLink(null, null, 'Billing', 'SSL'));
}
// load billing address page if no default address exists
if (!$OSCOM_ShoppingCart->hasBillingAddress()) {
$application->setPageTitle(OSCOM::getDef('payment_address_heading'));
$application->setPageContent('billing_address.php');
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment_address.js'));
$OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
if (!$OSCOM_Customer->isLoggedOn()) {
$osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getBillingAddress());
}
} else {
$OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment.js'));
// load all enabled payment modules
$OSCOM_Payment = Registry::get('Payment');
$OSCOM_Payment->loadAll();
$OSCOM_Template->addJavascriptBlock($OSCOM_Payment->getJavascriptBlocks());
}
// HPDL
// if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
// $OSCOM_MessageStack->add('CheckoutBilling', $error['error'], 'error');
// }
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:34,代码来源:Billing.php
注:本文中的osCommerce\OM\Core\Registry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论