本文整理汇总了PHP中tep_get_address_format_id函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_get_address_format_id函数的具体用法?PHP tep_get_address_format_id怎么用?PHP tep_get_address_format_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_get_address_format_id函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tep_image
?>
</td>
<td class="main" width="50%" valign="top" align="right"><?php
echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif');
?>
</td>
<td><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
<?php
$radio_buttons = 0;
$addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "'");
while ($addresses = tep_db_fetch_array($addresses_query)) {
$format_id = tep_get_address_format_id($addresses['country_id']);
?>
<tr>
<td><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ($addresses['address_book_id'] == $sendto) {
echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
<td width="10"><?php
示例2: while
<?php
echo TEXT_SELECT_OTHER_PAYMENT_DESTINATION;
?>
</div>
</div>
<div class="contentText">
<table class="table table-striped table-condensed table-hover">
<tbody>
<?php
$Qab = $OSCOM_Db->prepare('select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where customers_id = :customers_id order by firstname, lastname');
$Qab->bindInt(':customers_id', $_SESSION['customer_id']);
$Qab->execute();
while ($Qab->fetch()) {
$format_id = tep_get_address_format_id($Qab->valueInt('country_id'));
if ($Qab->valueInt('address_book_id') == $_SESSION['billto']) {
echo ' <tr id="defaultSelected" class="moduleRowSelected">' . "\n";
} else {
echo ' <tr class="moduleRow">' . "\n";
}
?>
<td>
<strong><?php
echo HTML::outputProtected($Qab->value('firstname') . ' ' . $Qab->value('lastname'));
?>
</strong>
<div class="help-block"><?php
echo tep_address_format($format_id, $Qab->toArray(), true, ' ', ', ');
?>
示例3: tep_address_label
function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
if (is_array($address_id) && !empty($address_id)) {
return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln);
}
$address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customers_id . "' and address_book_id = '" . (int) $address_id . "'");
$address = tep_db_fetch_array($address_query);
$format_id = tep_get_address_format_id($address['country_id']);
return tep_address_format($format_id, $address, $html, $boln, $eoln);
}
示例4: tep_db_query
if (tep_session_is_registered('customer_id')) {
// logged in
if (CARTSHIP_SHOWWT == 'true') {
$showweight = ' (' . $total_weight . ' ' . CARTSHIP_WTUNIT . ')';
} else {
$showweight = '';
}
if (CARTSHIP_SHOWIC == 'true') {
//ishazer remover hard code for version 2.20 : $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
$ShipTxt .= '<tr><td class="main">' . ($total_count == 1 ? ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
}
$addresses_query = tep_db_query("select address_book_id, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");
// only display addresses if more than 1
if (tep_db_num_rows($addresses_query) > 1) {
while ($addresses = tep_db_fetch_array($addresses_query)) {
$addresses_array[] = array('id' => $addresses['address_book_id'], 'text' => tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, 0, ' ', ' '));
}
$ShipTxt .= '<tr><td colspan="3" class="main" nowrap>' . CART_SHIPPING_METHOD_ADDRESS . ' ' . tep_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"') . '</td></tr>';
}
$ShipTxt .= '<tr valign="top"><td class="main"><b>' . CART_SHIPPING_METHOD_TO . '</b> </td><td colspan="2" class="main">' . tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td></tr>';
} else {
// not logged in
$ShipTxt .= CART_SHIPPING_OPTIONS_LOGIN;
if (CARTSHIP_SHOWIC == 'true') {
//azer for 2.20: $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
$ShipTxt .= '<tr><td class="main" nowrap>' . ($total_count == 1 ? ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main" nowrap>' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
}
if ($cart->get_content_type() != 'virtual') {
if (CARTSHIP_SHOWCDD == 'true') {
$ShipTxt .= '<tr><td colspan="3" class="main" nowrap>' . ENTRY_COUNTRY . ' ' . tep_get_country_list('country_id', $selected_country, 'style="width=200"') . '<br />';
}
示例5: put_all_data_in_db
private function put_all_data_in_db($orders_id)
{
global $currency, $currencies;
//fill orders table
if (extension_loaded('apc') && ini_get('apc.enabled')) {
apc_delete('temp_orders_' . $orders_id);
apc_delete('temp_orders_products_' . $orders_id);
apc_delete('temp_orders_status_history_' . $orders_id);
apc_delete('temp_orders_total_' . $orders_id);
}
$this->get_all_data_from_temp_db($orders_id);
$orders = $this->temp_data[$orders_id]['orders'];
unset($orders['orders_id']);
unset($orders['delivery_address_id']);
unset($orders['billing_address_id']);
unset($orders['coupon_id']);
unset($orders['payment_method_extra']);
unset($orders['shipping_method_extra']);
unset($orders['processed_order_id']);
$orders['abo_status'] = '0';
$orders['date_purchased'] = $orders['last_modified'] = date("Y-m-d H:m:s");
$orders['currency'] = $currency;
$orders['currency_value'] = $currencies->currencies[$currency]['value'];
$orders['customers_address_format_id'] = tep_get_address_format_id($orders['customers_country']);
$orders['customers_country'] = tep_get_country_name($orders['customers_country']);
$orders['billing_address_format_id'] = tep_get_address_format_id($orders['billing_country']);
$orders['billing_country'] = tep_get_country_name($orders['billing_country']);
$orders['delivery_address_format_id'] = tep_get_address_format_id($orders['delivery_country']);
$orders['delivery_country'] = tep_get_country_name($orders['delivery_country']);
tep_db_perform('orders', $orders, 'insert');
$new_orders_id = tep_db_insert_id();
//add order id to temp orders table
tep_db_query('UPDATE temp_orders SET processed_order_id = "' . $new_orders_id . '" WHERE orders_id = "' . $orders_id . '"');
//fill orders_products table
$orders_products = $this->temp_data[$orders_id]['orders_products'];
//fill orders_products_attributes
$orders_products_attributes = $this->temp_data[$orders_id]['orders_products_attributes'];
if (is_array($orders_products)) {
foreach ($orders_products as $products_order_id => $data) {
unset($orders_products[$products_order_id]['orders_products_id']);
unset($orders_products[$products_order_id]['products_weight']);
$orders_products[$products_order_id]['orders_id'] = $new_orders_id;
tep_db_perform('orders_products', $orders_products[$products_order_id], 'insert');
$orders_products_id = tep_db_insert_id();
if (is_array($orders_products_attributes)) {
foreach ($orders_products_attributes[$products_order_id] as $key => $value) {
unset($orders_products_attributes[$products_order_id][$key]['orders_products_attributes_id']);
$orders_products_attributes[$products_order_id][$key]['orders_id'] = $new_orders_id;
$orders_products_attributes[$products_order_id][$key]['orders_products_id'] = $orders_products_id;
tep_db_perform('orders_products_attributes', $orders_products_attributes[$products_order_id][$key], 'insert');
}
}
}
}
//fill orders_products_status_history table
$orders_status_history = $this->temp_data[$orders_id]['orders_status_history'];
if (is_array($orders_status_history)) {
foreach ($orders_status_history as $key => $value) {
unset($orders_status_history[$key]['orders_status_history_id']);
$orders_status_history[$key]['orders_id'] = $new_orders_id;
$orders_status_history[$key]['orders_status_id'] = $orders['orders_status'];
tep_db_perform('orders_status_history', $orders_status_history[$key], 'insert');
}
}
//fill orders_total table
$orders_total = $this->temp_data[$orders_id]['orders_total'];
if (is_array($orders_total)) {
foreach ($orders_total as $key => $data) {
unset($orders_total[$key]['orders_total_id']);
$orders_total[$key]['orders_id'] = $new_orders_id;
tep_db_perform('orders_total', $orders_total[$key], 'insert');
}
}
return $new_orders_id;
}
示例6: tep_address_label
function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
$OSCOM_Db = Registry::get('Db');
if (is_array($address_id) && !empty($address_id)) {
return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln);
}
$Qaddress = $OSCOM_Db->prepare('select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id');
$Qaddress->bindInt(':address_book_id', $address_id);
$Qaddress->bindInt(':customers_id', $customers_id);
$Qaddress->execute();
$format_id = tep_get_address_format_id($Qaddress->valueInt('country_id'));
return tep_address_format($format_id, $Qaddress->toArray(), $html, $boln, $eoln);
}
示例7: paypal_express
// initialize variables if the customer is not logged in
if (!tep_session_is_registered('customer_id')) {
$customer_id = 0;
$customer_default_address_id = 0;
}
require 'includes/modules/payment/paypal_express.php';
$paypal_express = new paypal_express();
if (!$paypal_express->check() || !$paypal_express->enabled) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));
}
if (!tep_session_is_registered('sendto')) {
if (tep_session_is_registered('customer_id')) {
$sendto = $customer_default_address_id;
} else {
$country = tep_get_countries(STORE_COUNTRY, true);
$sendto = array('firstname' => '', 'lastname' => '', 'company' => '', 'street_address' => '', 'suburb' => '', 'postcode' => '', 'city' => '', 'zone_id' => STORE_ZONE, 'zone_name' => tep_get_zone_name(STORE_COUNTRY, STORE_ZONE, ''), 'country_id' => STORE_COUNTRY, 'country_name' => $country['countries_name'], 'country_iso_code_2' => $country['countries_iso_code_2'], 'country_iso_code_3' => $country['countries_iso_code_3'], 'address_format_id' => tep_get_address_format_id(STORE_COUNTRY));
}
}
if (!tep_session_is_registered('billto')) {
$billto = $sendto;
}
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
if (!tep_session_is_registered('cartID')) {
tep_session_register('cartID');
}
$cartID = $cart->cartID;
switch ($HTTP_GET_VARS['osC_Action']) {
case 'cancel':
tep_session_unregister('ppe_token');
tep_session_unregister('ppe_secret');
示例8: tep_db_prepare_input
$telephone = tep_db_prepare_input($_POST['customers_telephone']);
$fax = tep_db_prepare_input($_POST['customers_fax']);
$newsletter = tep_db_prepare_input($_POST['newsletter']);
$confirmation = tep_db_prepare_input($_POST['confirmation']);
$street_address = tep_db_prepare_input($_POST['entry_street_address']);
$company = tep_db_prepare_input($_POST['entry_company']);
$suburb = tep_db_prepare_input($_POST['entry_suburb']);
$postcode = tep_db_prepare_input($_POST['entry_postcode']);
$city = tep_db_prepare_input($_POST['entry_city']);
$zone_id = empty($_POST['zone_id']) ? 0 : tep_db_prepare_input($_POST['zone_id']);
$state = tep_db_prepare_input($_POST['entry_state']);
$country = tep_db_prepare_input(tep_get_country_name($_POST['entry_country']));
$country_id = (int) tep_db_prepare_input($_POST['entry_country']);
$customers_newsletter = tep_db_prepare_input($_POST['customers_newsletter']);
$customers_password = tep_db_prepare_input($_POST['customers_password']);
$format_id = tep_get_address_format_id($country_id);
$size = "1";
$payment_method = DEFAULT_PAYMENT_METHOD;
$new_value = "1";
$error = false;
// reset error flag
$temp_amount = "0";
$temp_amount = number_format($temp_amount, 2, '.', '');
$currency_text = DEFAULT_CURRENCY . ", 1";
if (isset($_POST['Currency'])) {
$currency_text = tep_db_prepare_input($_POST['Currency']);
}
$currency_array = explode(",", $currency_text);
$currency = $currency_array[0];
$currency_value = $currency_array[1];
$customer_service_id = tep_db_prepare_input($_POST['cust_service']);
示例9: array
$o['country'] = array('id' => (int) $bill_country, 'title' => $cty['countries_name'], 'iso_code_2' => $cty['countries_iso_code_2'], 'iso_code_3' => $cty['countries_iso_code_3']);
$o['country_id'] = (int) $bill_country;
$o['format_id'] = tep_get_address_format_id($bill_country);
$o['telephone'] = $telephone;
$o['email_address'] = $email_address;
}
if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) {
tep_session_register('shipping');
}
// $shipping = false;
$sendto = false;
}
$country_query = tep_db_query("SELECT countries_name, countries_iso_code_2, countries_iso_code_3 FROM " . TABLE_COUNTRIES . " WHERE countries_id = '" . (int) $ship_country . "'");
$cty = tep_db_fetch_array($country_query);
$order->delivery = array('firstname' => $firstname, 'lastname' => $lastname, 'company' => $ship_company, 'street_address' => $ship_street_address, 'suburb' => $ship_suburb, 'city' => $ship_city, 'postcode' => $ship_postcode, 'state' => $ship_state, 'zone_id' => $ship_zone_id, 'country' => array('id' => $cty['countries_id'], 'title' => $cty['countries_name'], 'iso_code_2' => $cty['countries_iso_code_2'], 'iso_code_3' => $cty['countries_iso_code_3']), 'country_id' => $ship_country, 'format_id' => tep_get_address_format_id($ship_country));
$order_totals = $order_total_modules->process();
// if ( (isset($_POST['shipping'])) && (strpos($_POST['shipping'], '_')) ) {
// $shipping = $_POST['shipping'];
// list($module, $method) = explode('_', $shipping);
// list($module, $method) = explode('_', $_POST['shipping']);
// $shipping=$shipping_options[$module][$method];
// if ( is_object($$module) || ($shipping == 'free_free') ) {
// if ($shipping == 'free_free') {
// $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
// $quote[0]['methods'][0]['cost'] = '0';
// } else {
// $quote = $shipping_modules->quote($method, $module);
// }
// if (isset($quote['error'])) {
// tep_session_unregister('shipping');
示例10: tep_address_label
function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
global $osC_Database;
$Qaddress = $osC_Database->query('select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where customers_id = :customers_id and address_book_id = :address_book_id');
$Qaddress->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
$Qaddress->bindInt(':customers_id', $customers_id);
$Qaddress->bindInt(':address_book_id', $address_id);
$Qaddress->execute();
$format_id = tep_get_address_format_id($Qaddress->valueInt('country_id'));
return tep_address_format($format_id, $Qaddress->toArray(), $html, $boln, $eoln);
}