本文整理汇总了PHP中zen_address_format函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_address_format函数的具体用法?PHP zen_address_format怎么用?PHP zen_address_format使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_address_format函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: zen_address_label
function zen_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
global $gBitDb;
$address_query = "SELECT `entry_firstname` as `firstname`, `entry_lastname` as `lastname`,\n `entry_company` as `company`, `entry_street_address` as `street_address`,\n `entry_suburb` as `suburb`, `entry_city` as `city`, `entry_postcode` as `postcode`,\n `entry_state` as `state`, `entry_zone_id` as `zone_id`,\n `entry_country_id` as `country_id`\n FROM " . TABLE_ADDRESS_BOOK . "\n WHERE `customers_id` = ? AND `address_book_id` = ?";
$address = $gBitDb->query($address_query, array((int) $customers_id, (int) $address_id));
$format_id = zen_get_address_format_id($address->fields['country_id']);
return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);
}
开发者ID:bitweaver,项目名称:commerce,代码行数:8,代码来源:functions_customers.php
示例2: while
?>
<?php
while (!$addresses->EOF) {
if ($addresses->fields['address_book_id'] == $_SESSION['sendto']) {
echo ' <div id="defaultSelected" class="moduleRowSelected">' . "\n";
} else {
echo ' <div class="moduleRow">' . "\n";
}
?>
<div class="back"><?php
echo zen_draw_radio_field('address', $addresses->fields['address_book_id'], $addresses->fields['address_book_id'] == $_SESSION['sendto'], 'id="name-' . $addresses->fields['address_book_id'] . '"');
?>
</div>
<div class="back"><label for="name-<?php
echo $addresses->fields['address_book_id'];
?>
"><?php
echo zen_output_string_protected($addresses->fields['firstname'] . ' ' . $addresses->fields['lastname']);
?>
</label></div>
</div>
<br class="clearBoth" />
<address><?php
echo zen_address_format($format_id, $addresses->fields, true, ' ', '<br />');
?>
</address>
<?php
$addresses->MoveNext();
}
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:31,代码来源:tpl_modules_checkout_address_book.php
示例3: mysql_free_result
}
}
mysql_free_result($result);
$sql = "SELECT DATE_FORMAT(date_purchased, '%m/%d/%Y') FROM orders WHERE orders_id = {$oID}";
$result = mysql_query($sql, $zen);
$date_purchased_result = mysql_fetch_assoc($result);
$date_purchased = array_pop($date_purchased_result);
mysql_free_result($result);
$sql = "SELECT * FROM " . TB_PREF . "debtors_master WHERE name=" . db_escape($order['customers_name']);
$result = db_query($sql, "Could not find customer by name");
if (db_num_rows($result) == 0) {
display_notification("Customer " . db_escape($order['customers_name']) . " not found");
break;
}
$customer = db_fetch_assoc($result);
$addr = db_escape(zen_address_format($zen, $order, 'delivery_'));
$sql = "SELECT * FROM " . TB_PREF . "cust_branch WHERE debtor_no =" . $customer['debtor_no'] . " AND br_address = " . $addr;
$result = db_query($sql, "could not find customer branch");
if (db_num_rows($result) == 0) {
$debtor_no = $customer['debtor_no'];
$sql = "SELECT * FROM " . TB_PREF . "cust_branch WHERE debtor_no = {$debtor_no}";
$result = db_query($sql, "could not find any customer branch");
$old_branch = db_fetch_assoc($result);
$sql_new = "INSERT INTO " . TB_PREF . "cust_branch (debtor_no, br_name, br_address, area, salesman, " . "contact_name, default_location, tax_group_id, sales_account, " . "sales_discount_account, receivables_account, payment_discount_account, br_post_address, branch_ref) " . "VALUES ({$debtor_no}, '" . $customer['name'] . "', {$addr}, '" . $old_branch['area'] . "', '" . $old_branch['salesman'] . "', '" . $old_branch['contact_name'] . "', '" . $old_branch['default_location'] . "', 1, '" . $old_branch['sales_account'] . "', '" . $old_branch['sales_discount_account'] . "', '" . $old_branch['receivables_account'] . "', '" . $old_branch['payment_discount_account'] . "', {$addr}, '" . $customer['name'] . "')";
db_query($sql_new, "The customer branch could not be added 2");
$result = db_query($sql, "could not find customer branch");
}
$branch = db_fetch_assoc($result);
$cart = new Cart(30);
// New Sales Order
$cart->customer_id = $customer['debtor_no'];
开发者ID:blestab,项目名称:frontaccounting,代码行数:31,代码来源:zencart.php
示例4: zen_draw_radio_field
if ($addresses->fields['address_book_id'] == $_SESSION['sendto']) {
echo '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"><div id="defaultSelected" class="moduleRowSelected">' . "\n";
} else {
echo ' <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"><div class="moduleRow">' . "\n";
}
?>
<div class="back">
<?php
echo zen_draw_radio_field('address', $addresses->fields['address_book_id'], $addresses->fields['address_book_id'] == $_SESSION['sendto'], 'id="name-' . $addresses->fields['address_book_id'] . '"');
?>
<span class="add_title" style="margin-left:5px">
<label for="name-<?php
echo $addresses->fields['address_book_id'];
?>
"><?php
echo zen_output_string_protected($addresses->fields['firstname'] . ' ' . $addresses->fields['lastname']);
?>
</label>
</span>
</div>
<address>
<?php
echo zen_address_format(zen_get_address_format_id($addresses->fields['country_id']), $addresses->fields, true, ' ', '<br />');
?>
</address>
</div> </div> <!--end of divs in while loop -->
<?php
$addresses->MoveNext();
}
?>
</div>
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:tpl_modules_checkout_address_book.php
示例5: CommerceCommission
<?php
$gBitSystem->verifyPermission('p_bitcommerce_retailer');
require_once BITCOMMERCE_PKG_PATH . 'classes/CommerceCommission.php';
if (count($_GET) > 2 || count($_POST) > 2) {
$gBitUser->verifyTicket();
}
$commissionManager = new CommerceCommission();
if (!empty($_REQUEST['save_commission_settings'])) {
$gBitUser->storePreference('commissions_payment_method', $_REQUEST['commissions_payment_method']);
if (!empty($_REQUEST['commissions_' . $_REQUEST['commissions_payment_method'] . '_address'])) {
$gBitUser->storePreference('commissions_' . $_REQUEST['commissions_payment_method'] . '_address', $_REQUEST['commissions_' . $_REQUEST['commissions_payment_method'] . '_address']);
}
}
$gBitSmarty->assign_by_ref('commissionList', $commissionManager->getHistory(array('user_id' => $gBitCustomer->mCustomerId)));
if ($addresses = $gBitCustomer->getAddresses()) {
foreach ($addresses as $addrId => $addr) {
$addressList[$addr['address_book_id']] = zen_address_format(zen_get_address_format_id($addr['country_id']), $addr, 0, ' ', ' ');
}
$gBitSmarty->assign_by_ref('addressList', $addressList);
$gBitSmarty->assign('defaultAddressId', $gBitUser->getPreference('commissions_check_address', $gBitCustomer->getDefaultAddress()));
}
$paymentOptions[''] = tra('Please Select Below...');
$paymentOptions['storecredit'] = tra('Store Credit');
$paymentOptions['paypal'] = tra('PayPal');
$paymentOptions['worldpay'] = tra('WorldPay');
$paymentOptions['check'] = tra('Check');
$gBitSmarty->assign('paymentOptions', $paymentOptions);
define('HEADING_TITLE', tra('Commissions'));
$gBitSmarty->display('bitpackage:bitcommerce/commissions.tpl');
开发者ID:bitweaver,项目名称:commerce,代码行数:30,代码来源:commissions.php
示例6: zen_address_format
<td class="main"><?php
echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>';
?>
</td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php
echo ENTRY_SHIP_TO;
?>
</b></td>
</tr>
<tr>
<td class="main"><?php
echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>');
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
</tr>
<tr>
<td class="main"><b><?php
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:invoice.php
示例7: zen_address_format
<?php
} else {
// temporary just remove these 4 lines
?>
<div>WARNING: Missing Shipping Information</div>
<?php
}
?>
</div>
<div id="myAccountPaymentInfo" class="floatingBox forward">
<h3><?php
echo HEADING_BILLING_ADDRESS;
?>
</h3>
<address><?php
echo zen_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />');
?>
</address>
<h4><?php
echo HEADING_PAYMENT_METHOD;
?>
</h4>
<div><?php
echo $order->info['payment_method'];
?>
</div>
</div>
<br class="clearBoth" />
</div>
开发者ID:potteryhouse,项目名称:product_image_on_invoice,代码行数:31,代码来源:tpl_account_history_info_default.php
示例8: foreach
<div class="panel-title"><?php
echo PRIMARY_ADDRESS_TITLE;
?>
</div>
<div class="row">
<?php
foreach ($addressArray as $addresses) {
?>
<div class="col-xs-6 col-sm-6 col-md-6">
<h3 class="addressBookDefaultName"><?php
echo zen_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
?>
</h3>
<address><?php
echo zen_address_format($addresses['format_id'], $addresses['address'], true, ' ', '<br />');
?>
</address>
<div class="form-inline">
<a class="btn btn-default" href="<?php
echo zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL');
?>
"><?php
echo BUTTON_EDIT_SMALL_ALT;
?>
</a>
<a class="btn btn-default" href="<?php
echo zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $addresses['address_book_id'], 'SSL');
?>
"><?php
echo BUTTON_DELETE_ALT;
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:tpl_create_account_success_default.php
示例9: zen_address_format
<td valign="top"><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="printMain" valign="top"><strong><?php echo ENTRY_CUSTOMER_ADDRESS; ?></strong></td>
<td class="printMain"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>
</tr>
</table></td>
<td valign="top"><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="printMain" valign="top"><strong><?php echo ENTRY_SHIPPING_ADDRESS; ?></strong></td>
<td class="printMain"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td>
</tr>
</table></td>
<td valign="top"><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="printMain" valign="top"><strong><?php echo ENTRY_BILLING_ADDRESS; ?></strong></td>
<td class="printMain"><?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="printMain"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>
<td class="printMain"><?php echo $order->customer['telephone']; ?></td>
</tr>
<tr>
<td class="printMain"><strong><?php echo ENTRY_EMAIL_ADDRESS; ?></strong></td>
<td class="printMain"><?php echo $order->customer['email_address']; ?></td>
</tr>
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:super_data_sheet.php
示例10: zen_draw_separator
</tr>
</table></td>
<td><?php
echo zen_draw_separator('pixel_trans.gif', '175', '1');
?>
</td>
<td align="right" valign="top"><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td class="main"><strong><?php
echo ENTRY_SOLD_TO;
?>
</strong></td>
</tr>
<tr>
<td class="main"><?php
echo zen_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>');
?>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
开发者ID:bislewl,项目名称:super_edit_orders_with_ty,代码行数:31,代码来源:packingslip.php
示例11: zen_get_address_fields
</div>
</li>
<?php
// ** BEGIN PAYPAL EXPRESS CHECKOUT **
if (!$payment_modules->in_special_checkout()) {
// ** END PAYPAL EXPRESS CHECKOUT **
?>
<li>
<div id="checkoutBillto" class="margin_t big_">
<ul>
<?php
$billToArray = zen_get_address_fields($_SESSION['customer_id'], $_SESSION['billto']);
echo '<b>' . $billToArray['firstname'] . ' ' . $billToArray['lastname'] . '</b>';
$billToArrayFiltered = filterName($billToArray);
$format_id_bill = zen_get_address_format_id($billToArrayFiltered['country_id']);
echo zen_address_format($format_id_bill, $billToArrayFiltered, true, ' ', '<br />');
echo '<br/>Phone: ' . $billToArray['phone'];
?>
</ul>
<?php
if (MAX_ADDRESS_BOOK_ENTRIES >= 2) {
?>
<ul class="pad_l_90px margin_t"><?php
echo '<a href="' . zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'url=checkout_shipping&edit=' . $_SESSION['billto'], 'SSL') . '">' . zen_image($template->get_template_dir('btn_edit.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_edit.gif', '', '', '', ' border="0"') . '</a>';
?>
</ul>
<?php
}
?>
</div>
<br class="clearBoth" />
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_checkout_shipping_default.php
示例12: zen_image
<li class="fl">
<?php
echo '<a class="pad_b2" href="javascript:document.checkout_address.address.value=\'' . $addresses->fields['address_book_id'] . '\';document.checkout_address.submit();" >';
echo zen_image($template->get_template_dir('btn_ship.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_ship.gif');
echo '</a>';
?>
<div class="pad_l">
<b><?php
echo zen_output_string_protected($addresses->fields['firstname'] . ' ' . $addresses->fields['lastname']);
?>
</b>
<?php
$array_filtered = filterName($addresses->fields);
?>
<?php
echo zen_address_format($format_id, $array_filtered, true, ' ', '<br />');
echo '<br />Phone:' . $addresses->fields['phone'];
?>
<ul class="pad_top">
<a href="<?php
echo zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses->fields['address_book_id']);
?>
">
<?php
echo zen_image($template->get_template_dir('btn_edit.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_edit.gif');
?>
</a>
<?php
if ($i != 0) {
?>
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_modules_checkout_address_book.php
示例13: getFormattedAddress
function getFormattedAddress($pAddressHash, $pBreak = '<br>')
{
$ret = '';
if ($this->isValid()) {
$ret = zen_address_format(BitBase::getParameter($this->{$pAddressHash}, 'format_id', 2), $this->{$pAddressHash}, 1, '', $pBreak);
}
return $ret;
}
开发者ID:bitweaver,项目名称:commerce,代码行数:8,代码来源:CommerceOrder.php
示例14: zen_draw_separator
<td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>'; ?></td>
</tr>
</table></td>
<td><?php echo zen_draw_separator('pixel_trans.gif', '60', '1'); ?></td>
<td valign="top"><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr>
<td class="main"><strong><?php echo ENTRY_SHIP_TO; ?></strong></td>
</tr>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr>
<td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td>
</tr>
</table></td>
<?php
if ($so->purchase_order) {
?>
<td align="right" valign="top"><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr>
<td class="main" colspan="2"><strong><?php echo ENTRY_PO_INFO; ?></strong></td>
</tr>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:invoice.php
示例15: zen_output_string_protected
<td width="10%" class="alignright fontbold"><?php
echo NAME;
?>
</td>
<td><?php
echo zen_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
?>
</td>
</tr>
<tr>
<td width="10%" class="alignright fontbold"><?php
echo ADDRESS;
?>
</td>
<td><?php
$tmp_addr = zen_address_format($addresses['format_id'], $addresses['address'], true, ' ', ' ');
$tmp_addr = str_replace($addresses['firstname'], '', $tmp_addr);
$tmp_addr = str_replace($addresses['lastname'], '', $tmp_addr);
$tmp_addr = preg_replace("/( )*/", '', $tmp_addr);
echo trim($tmp_addr);
?>
</td>
</tr>
<tr>
<td width="10%" class="alignright fontbold"><?php
echo TELEPHONE;
?>
</td>
<td><?php
echo $addresses['address']['telphone'];
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:tpl_my_address_book_default.php
示例16: zen_get_module_directory
* @package page
* @copyright Copyright 2010 oasis Team
* @copyright Portions 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: header_php.php 5403 2010-03-30 13:35:58Z john $
*/
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_PRINT_ORDER');
// check if custmer is allowed to see this order!
$order_query_check = $db->Execute("SELECT\tcustomers_id\n\t\t\t\t\t\t\t\t\t\tFROM " . TABLE_ORDERS . "\n\t\t\t\t\t\t\t\t\t\tWHERE orders_id='" . (int) $_GET['oID'] . "'");
$oID = (int) $_GET['oID'];
if ($order_query_check->RecordCount() > 0) {
if ($_SESSION['customer_id'] == $order_query_check->fields['customers_id']) {
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// get order data
require DIR_WS_CLASSES . 'order.php';
$print_order = new order($oID);
$address_label_customer = zen_address_format($print_order->customer['format_id'], $print_order->customer, 1, '', '<br />');
$address_label_shipping = zen_address_format($print_order->delivery['format_id'], $print_order->delivery, 1, '', '<br />');
$address_label_payment = zen_address_format($print_order->billing['format_id'], $print_order->billing, 1, '', '<br />');
$csID = $print_order->customer['csID'];
$language = $_SESSION['language'];
if ($print_order->info['payment_method'] != '' && $print_order->info['payment_method'] != 'no_payment') {
include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $print_order->print_order['payment_method'] . '.php';
$payment_method = constant(strtoupper('MODULE_PAYMENT_' . $print_order->info['payment_method'] . '_TEXT_TITLE'));
}
$comment = $print_order->info['comments'];
$date = zen_date_long($print_order->info['date_purchased']);
}
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:header_php.php
示例17: zen_draw_hidden_field
$ShipTxt .= zen_draw_hidden_field('sid', $selected_shipping['id']);
$ShipTxt .= '<table>';
if (sizeof($quotes)) {
if ($_SESSION['customer_id']) {
// logged in
$ShipTxt .= '<tr><td colspan="3" class="main">' . CART_ITEMS . $total_count . '</td></tr>';
$addresses = $db->execute("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 = '" . $_SESSION['customer_id'] . "'");
// only display addresses if more than 1
if ($addresses->RecordCount() > 1) {
while (!$addresses->EOF) {
$addresses_array[] = array('id' => $addresses->fields['address_book_id'], 'text' => zen_address_format(zen_get_address_format_id($addresses->fields['country_id']), $addresses->fields, 0, ' ', ' '));
$addresses->MoveNext();
}
$ShipTxt .= '<tr><td colspan="3" class="main" nowrap="nowrap">' . CART_SHIPPING_METHOD_ADDRESS . ' ' . zen_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"') . '</td></tr>';
}
$ShipTxt .= '<tr valign="top"><td class="main">' . CART_SHIPPING_METHOD_TO . '</td><td colspan="2" class="main">' . zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />') . '</td></tr>';
} else {
// not logged in
// $ShipTxt.=zen_output_warning(CART_SHIPPING_OPTIONS_LOGIN);
$ShipTxt .= '<tr><td colspan="3" class="main">' . CART_ITEMS . $total_count . '</td></tr>' . "\n\n";
if ($_SESSION['cart']->get_content_type() != 'virtual') {
$ShipTxt .= '<tr><td class="main">' . ENTRY_COUNTRY . '</td><td colspan="2" class="main">' . zen_get_country_list('country_id', $selected_country, 'style="width=200"') . '</td></tr>' . "\n\n";
//add state zone_id
$state_array[] = array('id' => '', 'text' => PULL_DOWN_SHIPPING_ESTIMATOR_SELECT);
$state_values = $db->Execute("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '{$selected_country}' order by zone_country_id DESC, zone_name");
while (!$state_values->EOF) {
$state_array[] = array('id' => $state_values->fields['zone_id'], 'text' => $state_values->fields['zone_name']);
$state_values->MoveNext();
}
$ShipTxt .= '<tr><td colspan="1" class="main">' . ENTRY_STATE . '</td><td colspan="2" class="main">' . zen_draw_pull_down_menu('state', $state_array) . '</td></tr>';
if (CART_SHIPPING_METHOD_ZIP_REQUIRED == "true") {
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:shipping_estimator.php
示例18: SetHeaderVars
function SetHeaderVars($order, $merge_selected_oids = true)
{
$this->firstOrderPageNumber = $this->PageNo() + 1;
$this->shipTo = zen_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n");
if ($order->delivery['street_address'] == '') {
$this->shipTo = zen_address_format($order->customer['format_id'], $order->customer, 0, '', "\n");
}
}
开发者ID:bislewl,项目名称:super_edit_orders_with_ty,代码行数:8,代码来源:lcsd_merged_packing_slips.php
示例19: replace_status_email
function replace_status_email($oID, $comments, $email_template_id)
{
require_once 'includes/classes/currencies.php';
$currencies = new currencies();
//オーダー情報の取得
require_once 'includes/classes/order.php';
$order = new order($oID);
//============ 以下、予約語を置換 ============
$comments = str_replace('[CUSTOMER_NAME]', stripslashes($order->customer['name']), $comments);
$comments = str_replace('[ORDER_ID]', stripslashes($oID), $comments);
if ($email_template_id != MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID) {
if (function_exists('zen_visitors_purchase_is_visitors_order') && zen_visitors_purchase_is_visitors_order($oID)) {
$invoice_url = '';
} elseif (function_exists('zen_catalog_href_link')) {
$invoice_url = zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL');
$invoice_url = MODULE_EMAIL_TEMPLATE_INVOICE_TEXT . "\n" . $invoice_url;
} else {
$invoice_url = zen_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL', false);
}
$comments = str_replace('[INVOICE_URL]', $invoice_url, $comments);
}
// insert comments if status changed
if ($email_template_id != MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_MAIL_ID && $email_template_id != MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID) {
if ($_POST['notify_comments'] == 'on') {
$notify_comments = stripslashes($_POST['comments']);
} else {
$notify_comments = '';
}
$comments = str_replace('[COMMENTS]', $notify_comments, $comments);
}
// products
$products_ordered = "";
for ($i = 0, $n = count($order->products); $i < $n; $i++) {
$products_ordered_attributes = '';
for ($j = 0; $j < count($order->products[$i]['attributes']); $j++) {
$products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value'];
}
$products_ordered .= $order->products[$i]['name'] . ($order->products[$i]['model'] != '' ? ' (' . $order->products[$i]['model'] . ') ' : '') . $order->products[$i]['qty'] . '点 ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . ($order->products[$i]['onetime_charges'] != 0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($order->products[$i]['onetime_charges'], $order->products[$i]['tax'], 1) : '') . $products_ordered_attributes . "\n";
}
$comments = str_replace('[PRODUCTS_ORDERED]', stripslashes($products_ordered), $comments);
// totals
$totals = '';
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
$totals .= strip_tags($order->totals[$i]['title']) . ' ' . strip_tags($order->totals[$i]['text']) . "\n";
}
$comments = str_replace('[TOTALS]', stripslashes($totals), $comments);
$billing_address = zen_address_format($order->billing['format_id'], $order->billing, 0, '', "\n");
$comments = str_replace('[BILLING_ADDRESS]', stripslashes($billing_address), $comments);
if (isset($GLOBALS['phpmailer']['content_type']) && $GLOBALS['phpmailer']['content_type'] != 'virtual') {
$delivery_address = stripslashes(zen_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n"));
} else {
$delivery_address = MODULE_EMAIL_TEMPLATE_NOT_DELIVERY;
}
$comments = str_replace('[DELIVERY_ADDRESS]', $delivery_address, $comments);
$comments = str_replace('[PAYMENT_METHOD]', stripslashes($order->info['payment_method']), $comments);
$date_ordered = strftime(MODULE_EMAIL_TEMPLATE_DATE_FORMAT_LONG, strtotime($order->info['date_purchased']));
$weekday = array(MODULE_EMAIL_TEMPLATE_SUN, MODULE_EMAIL_TEMPLATE_MON, MODULE_EMAIL_TEMPLATE_TUE, MODULE_EMAIL_TEMPLATE_WED, MODULE_EMAIL_TEMPLATE_THU, MODULE_EMAIL_TEMPLATE_FRI, MODULE_EMAIL_TEMPLATE_SAT);
$date_ordered .= $weekday[strftime('%w', strtotime($order->info['date_purchased']))];
$comments = str_replace('[DATE_ORDERED]', $date_ordered, $comments);
// insert orderd comment
if ($email_template_id == MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_MAIL_ID || $email_template_id == MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID) {
if (!empty($GLOBALS['phpmailer']['comments'])) {
$order_comments = stripslashes($GLOBALS['phpmailer']['comments']);
} else {
$order_comments = '';
}
$comments = str_replace('[COMMENT]', $order_comments, $comments);
}
return $comments;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:70,代码来源:functions.php
示例20: while
}
// set cheapest last
$selected_shipping = $shipping_modules->cheapest();
$shipping = $selected_shipping;
if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') {
$show_in = FILENAME_POPUP_SHIPPING_ESTIMATOR;
} else {
$show_in = FILENAME_SHOPPING_CART;
}
// if(sizeof($quotes)) {
if ($_SESSION['customer_id']) {
$addresses = $db->execute("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 = '" . (int) $_SESSION['customer_id'] . "'");
// only display addresses if more than 1
if ($addresses->RecordCount() > 1) {
while (!$addresses->EOF) {
$addresses_array[] = array('id' => $addresses->fields['address_book_id'], 'text' => zen_address_format(zen_get_address_format_id($addresses->fields['country_id']), $addresses->fields, 0, ' ', ' '));
$addresses->MoveNext();
}
}
} else {
if ($_SESSION['cart']->get_content_type() != 'virtual') {
$state_array[] = array('id' => '', 'text' => PULL_DOWN_SHIPPING_ESTIMATOR_SELECT);
$state_values = $db->Execute("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int) $selected_country . "' order by zone_country_id DESC, zone_name");
while (!$state_values->EOF) {
$state_array[] = array('id' => $state_values->fields['zone_id'], 'text' => $state_values->fields['zone_name']);
$state_values->MoveNext();
}
}
}
// }
// This is done after quote-calcs in order to include Tare info accurately. NOTE: tare values are *not* included in weights shown on-screen.
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:shipping_estimator.php
注:本文中的zen_address_format函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论