本文整理汇总了PHP中tep_address_format函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_address_format函数的具体用法?PHP tep_address_format怎么用?PHP tep_address_format使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_address_format函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: print_address
function print_address($x, $y, $nums)
{
global $pdf, $num, $billing;
$pos = $y;
global $orders_query;
global $order;
global $orders;
global $languages_id;
global $_POST;
if ($order) {
if ($billing == true) {
$addressparts = explode("\n", tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n"));
} else {
$addressparts = explode("\n", tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n"));
}
foreach ($addressparts as $addresspart) {
$fontsize = GENERAL_FONT_SIZE;
while ($pdf->getTextWidth($fontsize, $addresspart) > LABEL_WIDTH) {
$fontsize--;
}
//$addresspart = preg_replace("%,[[:space:]]*$%", "", $addresspart);
$pdf->addText($x, $pos -= GENERAL_LINE_SPACING, $fontsize, $addresspart);
}
$pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET - 22, $y + ORDERIDYOFFSET, ORDERIDFONTSIZE, $orders['orders_id']);
if ($_POST['status'] && $_POST['status'] != $order->info['orders_status']) {
$customer_notified = 0;
$status = tep_db_prepare_input($_POST['status']);
$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, BATCH_COMMENTS) . "\n\n";
if ($_POST['notify']) {
$status_query = tep_db_query("select orders_status_name as name from " . TABLE_ORDERS_STATUS . " where language_id = " . $languages_id . " and orders_status_id = " . tep_db_input($status));
$status_name = tep_db_fetch_array($status_query);
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders['orders_id'] . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($order->info['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $status_name['name']);
tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$customer_notified = '1';
}
tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . $orders['orders_id'] . "'");
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) \r\n values ('" . $orders['orders_id'] . "', '" . tep_db_input($status) . "', now(), '" . $customer_notified . "', '" . $notify_comments . "')");
}
if ($nums % NUM_LABELS_PER_PAGE == NUM_LABELS_PER_PAGE - 1) {
$order = false;
return false;
} else {
if ($orders = tep_db_fetch_array($orders_query)) {
$order = new order($orders['orders_id']);
return true;
} else {
$order = false;
return false;
}
}
} else {
return false;
}
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:54,代码来源:batch_print.php
示例2: tep_href_link
<?php
if ($Qaddresses->valueInt('address_book_id') == $osC_Customer->default_address_id) {
echo ' <small><i>' . PRIMARY_ADDRESS . '</i></small>';
}
?>
</td>
<td align="right"><?php
echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&edit', 'SSL') . '">' . tep_image_button('small_edit.gif', SMALL_IMAGE_BUTTON_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&delete', 'SSL') . '">' . tep_image_button('small_delete.gif', SMALL_IMAGE_BUTTON_DELETE) . '</a>';
?>
</td>
</tr>
<tr>
<td colspan="2" style="padding: 0px 0px 10px 10px;"><?php
echo tep_address_format($format_id, $Qaddresses->toArray(), true, ' ', '<br>');
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
</div>
<div class="submitFormButtons">
<span style="float: right;">
<?php
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:30,代码来源:address_book.php
示例3: tep_draw_separator
?>
</td>
</tr>
<tr>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td class="main"><?php
echo tep_address_format($format_id, $addresses, true, ' ', ', ');
?>
</td>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
</table></td>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
</table></td>
<td><?php
开发者ID:laiello,项目名称:hotel-os,代码行数:31,代码来源:checkout_shipping_address.php
示例4: tep_draw_hidden_field
echo tep_draw_hidden_field('action', 'submit') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
?>
</div>
</div> -->
<fieldset>
<legend><?php
echo TABLE_HEADING_ADDRESS_BOOK_ENTRIES;
?>
</legend>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
$radio_buttons = 0;
$addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ")");
while ($addresses = tep_db_fetch_array($addresses_query)) {
$format_id = tep_get_address_format_id($addresses['country_id']);
echo ' <tr valign="top">' . "\n" . ' <td>' . tep_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $sendto, 'style="margin-bottom: -2px;"') . tep_address_format($format_id, $addresses, true, ' ', ', ') . '</td>' . "\n" . ' </tr>';
$radio_buttons++;
}
?>
</table>
</fieldset>
<div class="buttons">
<div style="text-align: right;"><?php
echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
?>
</div>
</div>
<?php
}
}
if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:checkout_shipping_address.php
示例5: 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);
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:10,代码来源:general.php
示例6: while
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, ' ', ', ');
?>
</div>
</td>
<td align="right"><?php
echo HTML::radioField('address', $Qab->valueInt('address_book_id'), $Qab->valueInt('address_book_id') == $_SESSION['billto']);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:31,代码来源:checkout_payment_address.php
示例7: send_order_mail
//.........这里部分代码省略.........
$Varmodeship .= '<br />' . $description;
}
} else {
//method title
if (method_exists(${$shipping_method}, 'getTitle')) {
$Varmodeship .= '<br />' . Translate(${$shipping_method}->getTitle());
} else {
$Varmodeship .= '<br />' . ${$shipping_method}->config['description'];
}
}
if (isset(${$shipping_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description'])) {
$constants = get_defined_constants();
$description = '';
$description_lines = explode("\n", stripslashes(${$payment_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description']));
foreach ($description_lines as $line) {
if (preg_match_all('/(\\w*\\([^)]*\\))/', $line, $matches)) {
foreach ($matches[0] as $match) {
print eval('$Nmatch = ' . $match . ';');
$line = str_replace($match, $Nmatch, $line);
}
}
$line = str_replace(array_keys($constants), $constants, $line);
$description .= $line;
}
$Varmodpay .= '<br />' . $description;
}
}
//eof Get shipping method
//email vars
$Varlogo = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'mail/logo.jpg" border="0" /></a> ';
$Vartable1 = '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">';
$Vartable2 = '<table width="100%" border="0" cellpadding="3" cellspacing="3" bgcolor="#EFEFEF">';
$varHiddenTest = Translate('Bestelnummer') . ': <STRONG> ' . $order_id . '</STRONG>' . "\n" . Translate('Besteldatum') . ': <strong>' . utf8_encode(strftime(DATE_FORMAT_LONG)) . '</strong>' . "\n" . Translate('Totaal') . ': ' . str_replace('€', '€', $order_total) . "\n";
$Vartext1 = '<b>' . Translate('Beste') . ' ' . $this->temp_data[$order_id]['orders']['customers_name'] . ' </b><br>' . Translate('Hartelijk dank voor uw bestelling bij ') . ' ' . STORE_NAME;
$Vartext2 = ' ' . Translate('Bestelnummer') . ': <STRONG> ' . $order_id . '</STRONG><br>' . Translate('Besteldatum') . ': <strong>' . utf8_encode(strftime(DATE_FORMAT_LONG)) . '</strong><br><a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $order_id . '">' . Translate('Gedetailleerde pakbon') . ': ' . $order_id . '</a>';
$Varmailfooter = Translate('Dit email adres is ingegeven op onze website door u of door een van onze bezoekers. Als u zich niet ingeschreven hebt op onze website contacteer ons dan via') . ' ' . STORE_OWNER_EMAIL_ADDRESS;
$Varretour = '<b>' . Translate('De consument heeft het recht aan de onderneming mee te delen dat hij afziet van de aankoop, zonder betaling van een boete en zonder opgave van een motief binnen 14 kalenderdagen vanaf de dag die volgt op de levering van het goed.') . '</b>';
$VarArticles = Translate('Item');
$VarModele = Translate('Product nummer');
$VarMaat = Translate('Maat');
$VarQte = Translate('Aantal');
$VarTotal = Translate('Totaal');
$VarAddresship = Translate('Verzendadres');
$VarAddressbill = Translate('Factuuradres');
$Varmetodpaye = Translate('Betaalmethode');
$Varmetodship = Translate('Verzendmethode');
$Vardetail = '';
$Varhttp = '<base href="' . HTTP_SERVER . DIR_WS_CATALOG . '">';
$Varstyle = '<link rel="stylesheet" type="text/css" href="stylesheetmail.css">';
$Varcomment = '';
foreach ($this->temp_data[$order_id]['orders_status_history'] as $key => $data) {
if ($data['comments']) {
$Varcomment = '<tr><td colspan="2" class="boxmail">' . Translate('Opmerking') . '</td></tr>';
$Varcomment .= '<tr><td colspan="2">' . $data['comments'] . '</td></tr>';
}
}
//eof email vars
//Get shipping address
$Varshipaddress = '';
$shipping_address = array();
$shipping_address['firstname'] = $this->temp_data[$order_id]['orders']['delivery_name'];
$shipping_address['email_address'] = $this->temp_data[$order_id]['orders']['customers_email_address'];
$shipping_address['telephone'] = $this->temp_data[$order_id]['orders']['customers_telephone'];
$shipping_address['street_address'] = $this->temp_data[$order_id]['orders']['delivery_street_address'];
$shipping_address['suburb'] = $this->temp_data[$order_id]['orders']['delivery_suburb'];
$shipping_address['city'] = $this->temp_data[$order_id]['orders']['delivery_city'];
$shipping_address['state'] = $this->temp_data[$order_id]['orders']['delivery_state'];
$shipping_address['country']['title'] = $this->temp_data[$order_id]['orders']['delivery_country'];
$shipping_address['postcode'] = $this->temp_data[$order_id]['orders']['delivery_postcode'];
$Varshipaddress = tep_address_format($this->temp_data[$order_id]['orders']['delivery_address_format_id'], $shipping_address, $html = false, $boln = '', $eoln = "\n");
//eof Get shipping address
//Get payment address
$Varadpay = '';
$payment_address = array();
$payment_address['firstname'] = $this->temp_data[$order_id]['orders']['billing_name'];
$payment_address['email_address'] = $this->temp_data[$order_id]['orders']['customers_email_address'];
$payment_address['telephone'] = $this->temp_data[$order_id]['orders']['customers_telephone'];
$payment_address['street_address'] = $this->temp_data[$order_id]['orders']['billing_street_address'];
$payment_address['suburb'] = $this->temp_data[$order_id]['orders']['billing_suburb'];
$payment_address['city'] = $this->temp_data[$order_id]['orders']['billing_city'];
$payment_address['state'] = $this->temp_data[$order_id]['orders']['billing_state'];
$payment_address['country']['title'] = $this->temp_data[$order_id]['orders']['billing_country'];
$payment_address['postcode'] = $this->temp_data[$order_id]['orders']['billing_postcode'];
$Varadpay = tep_address_format($this->temp_data[$order_id]['orders']['billing_address_format_id'], $payment_address, $html = false, $boln = '', $eoln = "\n");
//eof Get payment address
//load email template
$cwd = getcwd();
chdir($_SERVER['DOCUMENT_ROOT'] . DIR_WS_HTTP_CATALOG);
require DIR_WS_MODULES . 'email/html_checkout_process.php';
$email_order = $html_email_order;
chdir($cwd);
//send email
if (tep_mail($this->temp_data[$order_id]['orders']['customers_name'], $this->temp_data[$order_id]['orders']['customers_email_address'], Translate('Verwerking bestelling'), $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS)) {
tep_db_query('UPDATE orders_status_history SET customer_notified = 1 WHERE orders_id = "' . $order_id . '"');
}
//send extra emails
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, Translate('Verwerking bestelling'), $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
}
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Checkout.php
示例8: tep_display_tax_value
}
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
$attr[$i] = $order->products[$i]['attributes'];
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
$xoopsTpl->assign("attribs", 1);
}
}
$taxgroups = $order->info['tax_groups'];
if (sizeof($order->info['tax_groups']) > 1) {
$products[$i]['stax'] = 1;
$products[$i]['taxd'] = tep_display_tax_value($order->products[$i]['tax']);
}
$products[$i]['final_price'] = $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
}
$xoopsTpl->assign("fcpa_link", tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
$xoopsTpl->assign("bad", tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'));
$xoopsTpl->assign("fcp_link", tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$xoopsTpl->assign("cos_link", tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$xoopsTpl->assign("omt", $order->info['payment_method']);
if (MODULE_ORDER_TOTAL_INSTALLED) {
$xoopsTpl->assign("mot", 1);
$order_total_modules->process();
$xoopsTpl->assign("motc", $order_total_modules->output());
}
if (is_array($payment_modules->modules)) {
if ($confirmation = $payment_modules->confirmation()) {
$xoopsTpl->assign("pmods", 1);
$conffields = $confirmation['fields'];
for ($i = 0, $n = sizeof($confirmation['fields']); $i < $n; $i++) {
$r = $i;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:checkout_confirmation.php
示例9: tep_draw_separator
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2"><?php
echo tep_draw_separator();
?>
</td>
</tr>
<tr>
<td valign="top"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" valign="top"><b><?php
echo TEXT_AFFILIATE;
?>
</b></td>
<td class="main"><?php
echo tep_address_format($payments['affiliate_address_format_id'], $affiliate_address, 1, ' ', '<br>');
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo tep_draw_separator('pixel_trans.gif', '1', '5');
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo tep_draw_separator('pixel_trans.gif', '1', '5');
?>
</td>
</tr>
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:affiliate_payment.php
示例10: 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);
}
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:13,代码来源:general.php
示例11: quote
function quote($method = '')
{
global $order, $customer_id;
$method = (int) $method;
$zones_check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int) $order->delivery['country_id'] . "'");
$zones_check = tep_db_fetch_array($zones_check_query);
$specify_zone = $zones_check['total'] > 0 ? true : false;
$common_qty = 0;
$periodicals_qty = 0;
$total_sum = 0;
if (is_object($order)) {
reset($order->products);
while (list(, $order_product) = each($order->products)) {
if ($order_product['periodicity'] > 0) {
$periodicals_qty += $order_product['qty'];
} else {
$common_qty += $order_product['qty'];
$total_sum += $order_product['final_price'] * $order_product['qty'];
}
}
}
$points = array();
$zone_id = $order->delivery['zone_id'];
$self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : ""));
$self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
if ($self_delivery_check['total'] < 1) {
$parent_cities = array($order->delivery['postcode']);
tep_get_parents($parent_cities, $order->delivery['postcode'], TABLE_CITIES);
$parent_cities = array_reverse($parent_cities);
$parent_city_info_query = tep_db_query("select zone_id from " . TABLE_CITIES . " where city_country_id = '" . (int) $order->delivery['country_id'] . "' and city_id = '" . tep_db_input($parent_cities[0]) . "'");
$parent_city_info = tep_db_fetch_array($parent_city_info_query);
$zone_id = $parent_city_info['zone_id'];
$self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : ""));
$self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
if ($self_delivery_check['total'] < 1) {
$self_delivery_check_query = tep_db_query("select min(entry_zone_id-" . (int) $zone_id . ") as min_zone_id from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "' order by min_zone_id limit 1");
$self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
$zone_id = $self_delivery_check['min_zone_id'] + $zone_id;
}
}
$self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where" . ($method > 0 ? " self_delivery_id = '" . (int) $method . "'" : " entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : "")));
$self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
$self_delivery_query = tep_db_query("select self_delivery_id, self_delivery_cost, self_delivery_free, entry_country_id, entry_zone_id, entry_suburb as suburb, entry_city as city, entry_street_address as street_address, entry_telephone as telephone, self_delivery_description from " . TABLE_SELF_DELIVERY . " where self_delivery_status = '1'" . ($method > 0 ? " and self_delivery_id = '" . (int) $method . "'" : ($this->is_periodical ? "" : " and (self_delivery_only_periodicals = '0' or self_delivery_only_periodicals is null)") . " and entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : "") . " order by city, street_address") . "");
while ($self_delivery = tep_db_fetch_array($self_delivery_query)) {
$shipping_cost = 0;
$self_delivery['self_delivery_cost'] = str_replace(',', '.', $self_delivery['self_delivery_cost'] / $order->info['currency_value']);
$self_delivery['self_delivery_free'] = str_replace(',', '.', $self_delivery['self_delivery_free'] / $order->info['currency_value']);
if ($self_delivery['self_delivery_cost'] > 0) {
if ($common_qty > 0) {
if ($self_delivery['self_delivery_free'] > 0 && $total_sum > $self_delivery['self_delivery_free']) {
$shipping_cost = 0;
} else {
$shipping_cost = $self_delivery['self_delivery_cost'];
}
}
if ($periodicals_qty > 0) {
$shipping_cost += $periodicals_qty * $self_delivery['self_delivery_cost'];
}
} else {
$shipping_cost = 0;
}
$region_info_query = tep_db_query("select zone_name as state from " . TABLE_ZONES . " where zone_id = '" . (int) $self_delivery['entry_zone_id'] . "' and zone_country_id = '" . (int) $self_delivery['entry_country_id'] . "'");
if (tep_db_num_rows($region_info_query) > 0) {
$region_info = tep_db_fetch_array($region_info_query);
$self_delivery = array_merge($self_delivery, $region_info);
}
$points[] = array('id' => $self_delivery['self_delivery_id'], 'title' => tep_address_format($order->delivery['format_id'], $self_delivery, 1, '', ', '), 'cost' => $shipping_cost);
}
if (sizeof($points) == 0 && $self_delivery_check['total'] == 0) {
// $points[] = array('id' => $this->code,
// 'title' => MODULE_SHIPPING_SELF_TEXT_WAY,
// 'cost' => $shipping_cost);
}
if (sizeof($points) > 0) {
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SELF_TEXT_TITLE, 'methods' => $points);
}
return $this->quotes;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:78,代码来源:slf.php
示例12: explode
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
// set up delivery address array
$address_array = explode('<br>', tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'));
if (SHIP_FROM_COUNTRY == $address_array[count($address_array) - 1]) {
$address_array[count($address_array) - 1] = '';
}
$delivery_address_array = array();
$i = 0;
foreach ($address_array as $key => $value) {
if (!is_null($value) && $value !== "") {
$delivery_address_array[$i] = $value;
$i++;
}
}
// set up billing address array
$address_array = explode('<br>', tep_address_format($order->billing['format_id'], $order->billing, 1, '', '<br>'));
$lines = count($address_array) - 1;
if (SHIP_FROM_COUNTRY == $address_array[$lines]) {
$address_array[$lines] = '';
}
$billing_address_array = array();
$i = 0;
foreach ($address_array as $key => $value) {
if (!is_null($value) && $value !== "") {
$billing_address_array[$i] = $value;
$i++;
}
}
$address_array = explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
$i = 0;
//The first $key number is the number of lines in your store name and address excluding the telephone number at the bottom.
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:Integrated-Packing2.php
示例13: tep_address_format
<td class="main"><?php
echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></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 tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>');
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
echo tep_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:31,代码来源:packingslip.php
示例14: tep_db_query
</legend>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
$counter = 0;
$addresses_query = tep_db_query("(select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $customer_default_address_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ")) union (select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id <> '" . (int) $customer_default_address_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ") order by firstname, lastname) order by '" . (int) $customer_default_address_id . "'");
while ($addresses = tep_db_fetch_array($addresses_query)) {
$format_id = tep_get_address_format_id($addresses['country_id']);
$counter++;
$is_primary = false;
if ($addresses['address_book_id'] == $customer_default_address_id) {
$is_primary = true;
}
?>
<tr valign="top">
<td><?php
echo $counter . '. ' . ($is_primary ? '<strong>' : '') . tep_address_format($format_id, $addresses, true, ' ', ', ') . ($is_primary ? '</strong> <small>' . PRIMARY_ADDRESS . '</small>' : '');
?>
</td>
<td width="150" align="right"><?php
echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_EDIT . '</a> <a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $addresses['address_book_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_DELETE . '</a>';
?>
</td>
</tr>
<?php
}
?>
</table>
</fieldset>
<div class="buttons">
<div style="float: left;"><?php
echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK, 'class="button_back"') . '</a>';
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:address_book.php
示例15: tep_db_query
$radio_buttons = 0;
$i = 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)) {
$adr[$i] = $addresses;
$adr[$i]['radio'] = $radio_buttons;
$format_id = tep_get_address_format_id($addresses['country_id']);
if ($addresses['address_book_id'] == $sendto) {
$adr[$i]['sendto'] == 1;
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";
}
$adr[$i]['firstname'] = tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
$adr[$i]['addressradio'] = tep_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $sendto);
$adr[$i]['address'] = tep_address_format($format_id, $addresses, true, ' ', ', ');
$radio_buttons++;
$i++;
}
$xoopsTpl->assign("adr", $adr);
}
}
if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
$xoopsTpl->assign("maxadr", 1);
require DIR_WS_MODULES . 'checkout_new_address.php';
}
$xoopsTpl->assign("action", tep_draw_hidden_field('action', 'submit'));
$xoopsTpl->assign("bt_continue", tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
if ($process == true) {
$xoopsTpl->assign("process", 1);
$xoopsTpl->assign("csa_link", tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:checkout_shipping_address.php
示例16: tep_not_null
<td class="main"><?php
echo tep_not_null($order->delivery['time']) ? $order->delivery['time'] : TEXT_NOT_SET;
?>
</td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="main" width="100"><strong><?php
echo ENTRY_BILLING_ADDRESS;
?>
</strong></td>
<td class="main"><?php
$order_billing_array = $order->billing;
unset($order_billing_array['telephone']);
echo $order->billing['name'] . ', ' . tep_address_format($order->billing['format_id'], $order_billing_array, 1, '', '<br>');
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo tep_draw_separator('pixel_trans.gif', '1', '5');
?>
</td>
</tr>
<tr>
<td class="main"><strong><?php
echo ENTRY_TELEPHONE_NUMBER;
?>
</strong></td>
<td class="main"><?php
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:orders.php
示例17: strip_tags
<td><?php
echo TEXT_ORDER_PRODUCTS;
?>
</td>
<td><?php
echo $products['count'] . ' (' . strip_tags($history['order_total']) . ')';
?>
</td>
</tr>
<tr valign="top">
<td><?php
echo $order_type;
?>
</td>
<td><?php
echo tep_output_string_protected(tep_address_format($history['address_format_id'], $history, 1, ' ', ' '));
?>
</td>
</tr>
<?php
if (sizeof($tracking_numbers) > 0) {
?>
<tr valign="top">
<td><?php
echo TEXT_TRACKING_NUMBER;
?>
</td>
<td><?php
echo implode('<br />', $tracking_numbers);
?>
</td>
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:account_history.php
示例18: asdpostpay
function asdpostpay()
{
global $order, $customer_id;
$this->code = 'asdpostpay';
$this->title = MODULE_SHIPPING_ASDPOSTPAY_TEXT_TITLE;
$this->description = MODULE_SHIPPING_ASDPOSTPAY_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_ASDPOSTPAY_SORT_ORDER;
$this->icon = '';
$this->tax_class = 0;
$this->enabled = MODULE_SHIPPING_ASDPOSTPAY_STATUS == 'True' ? true : false;
$this->courier_enabled = false;
$this->pickup_enabled = false;
$this->pickup = '';
if ($order->content_type == 'virtual') {
$this->enabled = false;
}
if ($this->enabled) {
if (is_object($order)) {
reset($order->products);
while (list(, $order_product) = each($order->products)) {
if ($order_product['periodicity'] > 0) {
$this->enabled = false;
break;
}
}
}
}
if ($customer_id == 25627 || $customer_id == 2) {
$this->enabled = true;
}
if ($this->enabled) {
if ((int) MODULE_SHIPPING_ASDPOSTPAY_COURIER_ZONE > 0) {
$geozones_check_query = tep_db_query("select co
|
请发表评论