本文整理匯總了PHP中osC_Order::getBilling方法的典型用法代碼示例。如果您正苦於以下問題:PHP osC_Order::getBilling方法的具體用法?PHP osC_Order::getBilling怎麽用?PHP osC_Order::getBilling使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類osC_Order
的用法示例。
在下文中一共展示了osC_Order::getBilling方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadSummaryData
function loadSummaryData()
{
global $toC_Json, $osC_Language;
$osC_Order = new osC_Order($_REQUEST['orders_id']);
$response['customer'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getCustomer(), '<br />') . '</p>' . '<p style="margin-left:10px;>' . osc_icon('telephone.png') . $osC_Order->getCustomer('telephone') . '<br />' . osc_icon('write.png') . $osC_Order->getCustomer('email_address') . '</p>';
$response['shippingAddress'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getDelivery(), '<br />') . '</p>';
$response['billingAddress'] = '<p style="margin-left:10px;">' . osC_Address::format($osC_Order->getBilling(), '<br />') . '</p>';
$response['paymentMethod'] = '<p style="margin-left:10px;">' . $osC_Order->getPaymentMethod() . '</p>';
if ($osC_Order->isValidCreditCard()) {
$response['paymentMethod'] .= '
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>' . $osC_Language->get('credit_card_type') . '</td>
<td>' . $osC_Order->getCreditCardDetails('type') . '</td>
</tr>
<tr>
<td>' . $osC_Language->get('credit_card_owner_name') . '</td>
<td>' . $osC_Order->getCreditCardDetails('owner') . '</td>
</tr>
<tr>
<td>' . $osC_Language->get('credit_card_number') . '</td>
<td>' . $osC_Order->getCreditCardDetails('number') . '</td>
</tr>
<tr>
<td>' . $osC_Language->get('credit_card_expiry_date') . '</td>
<td>' . $osC_Order->getCreditCardDetails('expires') . '</td>
</tr>
</table>';
}
$response['status'] = '<p style="margin-left:10px;">' . $osC_Order->getStatus() . '<br />' . ($osC_Order->getDateLastModified() > $osC_Order->getDateCreated() ? osC_DateTime::getShort($osC_Order->getDateLastModified(), true) : osC_DateTime::getShort($osC_Order->getDateCreated(), true)) . '</p>' . '<p style="margin-left:10px;">' . $osC_Language->get('number_of_comments') . ' ' . $osC_Order->getNumberOfComments() . '</p>';
$response['total'] = '<p style="margin-left:10px;">' . $osC_Order->getTotal() . '</p>' . '<p style="margin-left:10px;">' . $osC_Language->get('number_of_products') . ' ' . $osC_Order->getNumberOfProducts() . '<br />' . $osC_Language->get('number_of_items') . ' ' . $osC_Order->getNumberOfItems() . '</p>';
echo $toC_Json->encode($response);
}
示例2: loadOrder
function loadOrder()
{
global $toC_Json;
$osC_Order = new osC_Order(isset($_REQUEST['orders_id']) ? $_REQUEST['orders_id'] : null);
require_once '../includes/classes/customer.php';
$osC_Customer = new osC_Customer();
$osC_Customer->setCustomerData($osC_Order->getCustomersID());
$enable_store_credit = false;
if ($osC_Order->isUseStoreCredit() || $osC_Customer->hasStoreCredit()) {
$enable_store_credit = true;
}
$data = array('customers_name' => $osC_Order->_customer['name'], 'currency' => $osC_Order->getCurrency(), 'email_address' => $osC_Order->_customer['email_address'], 'coupon_code' => $osC_Order->_coupon_code, 'payment_method' => $osC_Order->getPaymentModule(), 'use_store_credit' => $osC_Order->isUseStoreCredit(), 'has_payment_method' => $osC_Order->hasPaymentMethod(), 'enable_store_credit' => $enable_store_credit, 'gift_wrapping' => $osC_Order->_customer['gift_wrapping'] == '1' ? true : false, 'wrapping_message' => $osC_Order->_customer['wrapping_message'], 'billing_address' => str_replace(',', ' ', $osC_Order->getBilling('name')) . ',' . $osC_Order->getBilling('company') . ',' . $osC_Order->getBilling('street_address') . ',' . $osC_Order->getBilling('suburb') . ',' . $osC_Order->getBilling('city') . ',' . $osC_Order->getBilling('postcode') . ',' . $osC_Order->getBilling('state') . ',' . $osC_Order->getBilling('country_title'), 'shipping_address' => str_replace(',', ' ', $osC_Order->getDelivery('name')) . ',' . $osC_Order->getDelivery('company') . ',' . $osC_Order->getDelivery('street_address') . ',' . $osC_Order->getDelivery('suburb') . ',' . $osC_Order->getDelivery('city') . ',' . $osC_Order->getDelivery('postcode') . ',' . $osC_Order->getDelivery('state') . ',' . $osC_Order->getDelivery('country_title'));
unset($_SESSION['osC_Customer_data']);
$response = array('success' => true, 'data' => $data);
echo $toC_Json->encode($response);
}
示例3:
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td><b><?php
echo $osC_Language->get('subsection_billing_address');
?>
</b></td>
</tr>
<tr>
<td><?php
echo osC_Address::format($osC_Order->getBilling(), '<br />');
?>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><?php
echo $osC_Order->getCustomer('telephone');
?>
</td>
</tr>
<tr>
<td><?php
echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>';
示例4: listOrdersReturns
function listOrdersReturns()
{
global $toC_Json, $osC_Language, $osC_Database;
$start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
$limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
$Qreturns = $osC_Database->query('select r.orders_returns_id, r.orders_id, r.orders_returns_status_id, r.customers_comments, r.admin_comments, r.date_added, o.customers_name, ors.orders_returns_status_name from :table_orders o, :table_orders_returns r, :table_orders_returns_status ors where r.orders_id = o.orders_id and r.orders_returns_status_id = ors.orders_returns_status_id and ors.languages_id = :languages_id');
if (isset($_REQUEST['orders_id']) && !empty($_REQUEST['orders_id'])) {
$Qreturns->appendQuery('and r.orders_id = :orders_id ');
$Qreturns->bindInt(':orders_id', $_REQUEST['orders_id']);
}
if (isset($_REQUEST['customers_id']) && !empty($_REQUEST['customers_id'])) {
$Qreturns->appendQuery('and o.customers_id = :customers_id ');
$Qreturns->bindInt(':customers_id', $_REQUEST['customers_id']);
}
if (isset($_REQUEST['orders_returns_status_id']) && !empty($_REQUEST['orders_returns_status_id'])) {
$Qreturns->appendQuery('and r.orders_returns_status_id = :orders_returns_status_id ');
$Qreturns->bindInt(':orders_returns_status_id', $_REQUEST['orders_returns_status_id']);
}
$Qreturns->appendQuery('order by r.orders_returns_id desc ');
$Qreturns->bindTable(':table_orders', TABLE_ORDERS);
$Qreturns->bindTable(':table_orders_returns', TABLE_ORDERS_RETURNS);
$Qreturns->bindTable(':table_orders_returns_status', TABLE_ORDERS_RETURNS_STATUS);
$Qreturns->bindInt(':languages_id', $osC_Language->getID());
$Qreturns->setExtBatchLimit($start, $limit);
$Qreturns->execute();
$records = array();
while ($Qreturns->next()) {
$orders_returns_id = $Qreturns->value('orders_returns_id');
$Qproducts = $osC_Database->query("select orders_products_id, products_quantity from :table_orders_returns_products where orders_returns_id = :orders_returns_id");
$Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
$Qproducts->bindTable(':table_orders_returns_products', TABLE_ORDERS_RETURNS_PRODUCTS);
$Qproducts->bindInt(':orders_returns_id', $orders_returns_id);
$Qproducts->execute();
$return_products_ids = array();
$return_products_qty = array();
while ($Qproducts->next()) {
$return_products_ids[] = $Qproducts->valueInt('orders_products_id');
$return_products_qty[$Qproducts->valueInt('orders_products_id')] = $Qproducts->valueInt('products_quantity');
}
$total = 0;
$quantity = 0;
$products = array();
$return_quantity = array();
$osC_Order = new osC_Order($Qreturns->valueInt('orders_id'));
foreach ($osC_Order->getProducts() as $product) {
if (in_array($product['orders_products_id'], $return_products_ids)) {
$product_info = $return_products_qty[$product['orders_products_id']] . ' x ' . $product['name'];
if ($product['type'] == PRODUCT_TYPE_GIFT_CERTIFICATE) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_name') . ': ' . $product['senders_name'] . '</i></nobr>';
if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_email') . ': ' . $product['senders_email'] . '</i></nobr>';
}
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_name') . ': ' . $product['recipients_name'] . '</i></nobr>';
if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_email') . ': ' . $product['recipients_email'] . '</i></nobr>';
}
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('messages') . ': ' . $product['messages'] . '</i></nobr>';
}
if (isset($product['variants']) && is_array($product['variants']) && sizeof($product['variants']) > 0) {
foreach ($product['variants'] as $variants) {
$product_info .= '<br /><nobr> <i>' . $variants['groups_name'] . ': ' . $variants['values_name'] . '</i></nobr>';
}
}
$products[] = $product_info;
$total += $return_products_qty[$product['orders_products_id']] * $product['final_price'] * (1 + $product['tax'] / 100);
$quantity += $return_products_qty[$product['orders_products_id']];
$return_quantity[] = $product['orders_products_id'] . ':' . $return_products_qty[$product['orders_products_id']];
}
}
$action = array();
$orders_returns_status_id = $Qreturns->value('orders_returns_status_id');
if ($orders_returns_status_id == ORDERS_RETURNS_STATUS_REFUNDED_CREDIT_MEMO || $orders_returns_status_id == ORDERS_RETURNS_STATUS_REFUNDED_STORE_CREDIT || $orders_returns_status_id == ORDERS_RETURNS_STATUS_REJECT) {
$action[] = array('class' => 'icon-edit-gray-record', 'qtip' => $osC_Language->get('icon_edit'));
$action[] = array('class' => 'icon-credit-slip-gray-record', 'qtip' => $osC_Language->get('icon_credit_slip'));
$action[] = array('class' => 'icon-store-credit-gray-record', 'qtip' => $osC_Language->get('icon_issue_store_credit'));
} else {
$action[] = array('class' => 'icon-edit-record', 'qtip' => $osC_Language->get('icon_edit'));
$action[] = array('class' => 'icon-credit-slip-record', 'qtip' => $osC_Language->get('icon_credit_slip'));
$action[] = array('class' => 'icon-store-credit-record', 'qtip' => $osC_Language->get('icon_issue_store_credit'));
}
$records[] = array('orders_returns_id' => $orders_returns_id, 'orders_id' => $Qreturns->valueInt('orders_id'), 'orders_returns_customer' => $Qreturns->value('customers_name'), 'quantity' => $quantity, 'date_added' => osC_DateTime::getShort($Qreturns->value('date_added')), 'status' => $Qreturns->value('orders_returns_status_name'), 'status_id' => $orders_returns_status_id, 'products' => implode('<br />', $products), 'return_quantity' => implode(';', $return_quantity), 'billing_address' => osC_Address::format($osC_Order->getBilling(), '<br />'), 'customers_comments' => $Qreturns->value('customers_comments'), 'admin_comments' => $Qreturns->value('admin_comments'), 'total' => number_format($total, 2, '.', ''), 'action' => $action);
}
$response = array(EXT_JSON_READER_TOTAL => $Qreturns->getBatchSize(), EXT_JSON_READER_ROOT => $records);
echo $toC_Json->encode($response);
}
示例5: listCreditsMemo
function listCreditsMemo()
{
global $toC_Json, $osC_Database, $osC_Language;
$osC_Currencies = new osC_Currencies_Admin();
$start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
$limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
$Qslips = $osC_Database->query('select r.* from :table_orders_refunds r ');
if (isset($_REQUEST['customers_id']) && !empty($_REQUEST['customers_id'])) {
$Qslips->appendQuery(', ' . TABLE_ORDERS . ' o where r.orders_id = o.orders_id and o.customers_id = :customers_id and r.orders_refunds_type = :orders_refunds_type');
$Qslips->bindInt(':customers_id', $_REQUEST['customers_id']);
} else {
$Qslips->appendQuery('where orders_refunds_type = :orders_refunds_type');
}
if (isset($_REQUEST['orders_id']) && !empty($_REQUEST['orders_id'])) {
$Qslips->appendQuery('and orders_id = :orders_id ');
$Qslips->bindInt(':orders_id', $_REQUEST['orders_id']);
}
$Qslips->bindTable(':table_orders_refunds', TABLE_ORDERS_REFUNDS);
$Qslips->bindInt(':orders_refunds_type', ORDERS_RETURNS_TYPE_CREDIT_SLIP);
$Qslips->setExtBatchLimit($start, $limit);
$Qslips->execute();
$records = array();
while ($Qslips->next()) {
$orders_refunds_id = $Qslips->value('orders_refunds_id');
$Qproducts = $osC_Database->query("select orders_products_id, products_quantity from :table_orders_refunds_products where orders_refunds_id = :orders_refunds_id");
$Qproducts->bindTable(':table_orders_refunds_products', TABLE_ORDERS_REFUNDS_PRODUCTS);
$Qproducts->bindInt(':orders_refunds_id', $orders_refunds_id);
$Qproducts->execute();
$products_ids = array();
$products_qty = array();
while ($Qproducts->next()) {
$products_ids[] = $Qproducts->valueInt('orders_products_id');
$products_qty[$Qproducts->valueInt('orders_products_id')] = $Qproducts->valueInt('products_quantity');
}
$total = 0;
$quantity = 0;
$products = array();
$osC_Order = new osC_Order($Qslips->valueInt('orders_id'));
$products_table = '<table width="100%">';
foreach ($osC_Order->getProducts() as $product) {
if (in_array($product['orders_products_id'], $products_ids)) {
$product_info = $products_qty[$product['orders_products_id']] . ' x ' . $product['name'];
if ($product['type'] == PRODUCT_TYPE_GIFT_CERTIFICATE) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_name') . ': ' . $product['senders_name'] . '</i></nobr>';
if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('senders_email') . ': ' . $product['senders_email'] . '</i></nobr>';
}
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_name') . ': ' . $product['recipients_name'] . '</i></nobr>';
if ($product['gift_certificates_type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('recipients_email') . ': ' . $product['recipients_email'] . '</i></nobr>';
}
$product_info .= '<br /><nobr> <i>' . $osC_Language->get('messages') . ': ' . $product['messages'] . '</i></nobr>';
}
if (isset($product['variants']) && is_array($product['variants']) && sizeof($product['variants']) > 0) {
foreach ($product['variants'] as $variants) {
$product_info .= '<br /><nobr> <i>' . $variants['groups_name'] . ': ' . $variants['values_name'] . '</i></nobr>';
}
}
$products[] = $product_info;
$quantity += $products_qty[$product['orders_products_id']];
$products_table .= '<tr><td>' . $product_info . '</td><td width="60" valign="top" align="right">' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</td></tr>';
}
}
$products_table .= '</table>';
$order_total = '<table width="100%">';
$order_total .= '<tr><td align="right">' . $osC_Language->get("field_sub_total") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('sub_total')) . '</td></tr>';
$order_total .= '<tr><td align="right">' . $osC_Language->get("field_shipping_fee") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('shipping')) . '</td></tr>';
$order_total .= '<tr><td align="right">' . $osC_Language->get("field_handling") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('handling')) . '</td></tr>';
$order_total .= '<tr><td align="right">' . $osC_Language->get("field_refund_total") . ' </td><td width="60" align="right">' . $osC_Currencies->format($Qslips->value('refund_total')) . '</td></tr>';
$order_total .= '</table>';
$records[] = array('orders_refunds_id' => $Qslips->valueInt('orders_refunds_id'), 'credit_slips_id' => $Qslips->valueInt('credit_slips_id'), 'orders_id' => $Qslips->valueInt('orders_id'), 'customers_name' => $osC_Order->getCustomer('name'), 'total_products' => $quantity, 'total_refund' => $osC_Currencies->format($Qslips->value('refund_total')), 'sub_total' => $osC_Currencies->format($Qslips->value('sub_total')), 'date_added' => osC_DateTime::getShort($Qslips->value('date_added')), 'shipping_address' => osC_Address::format($osC_Order->getDelivery(), '<br />'), 'shipping_method' => $osC_Order->getDeliverMethod(), 'billing_address' => osC_Address::format($osC_Order->getBilling(), '<br />'), 'payment_method' => $osC_Order->getPaymentMethod(), 'comments' => $Qslips->value('comments'), 'products' => $products_table, 'totals' => $order_total);
}
$response = array(EXT_JSON_READER_TOTAL => $Qslips->getBatchSize(), EXT_JSON_READER_ROOT => $records);
echo $toC_Json->encode($response);
}
示例6:
</div>
<div class="infoBoxContent">
<p><?php
echo tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>');
?>
</p>
</div>
</td>
<td width="33%" valign="top">
<div class="infoBoxHeading"><?php
echo tep_image('templates/' . $template . '/images/icons/16x16/bill.png', ENTRY_BILLING_ADDRESS, '16', '16') . ' ' . ENTRY_BILLING_ADDRESS;
?>
</div>
<div class="infoBoxContent">
<p><?php
echo tep_address_format($osC_Order->getBilling('format_id'), $osC_Order->getBilling(), 1, '', '<br>');
?>
</p>
</div>
</td>
</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContent">
<tr>
<td width="33%" valign="top">
<div class="infoBoxHeading"><?php
echo tep_image('templates/' . $template . '/images/icons/16x16/payment.png', ENTRY_PAYMENT_METHOD, '16', '16') . ' ' . ENTRY_PAYMENT_METHOD;
?>