本文整理汇总了PHP中osC_Order::isUseStoreCredit方法的典型用法代码示例。如果您正苦于以下问题:PHP osC_Order::isUseStoreCredit方法的具体用法?PHP osC_Order::isUseStoreCredit怎么用?PHP osC_Order::isUseStoreCredit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osC_Order
的用法示例。
在下文中一共展示了osC_Order::isUseStoreCredit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}