本文整理汇总了PHP中Order::getCurrentStateFull方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getCurrentStateFull方法的具体用法?PHP Order::getCurrentStateFull怎么用?PHP Order::getCurrentStateFull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order::getCurrentStateFull方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHistory
public static function getHistory($orders)
{
$history = array();
foreach ($orders as $orderData) {
$order = new Order($orderData['id_order']);
$currency = new Currency($order->id_currency);
$status = $order->getCurrentStateFull(Context::getContext()->language->id);
$history[] = array('id' => $order->id_cart, 'amount' => self::formatDecimals($order->getTotalPaid()), 'due' => self::formatDecimals($order->getTotalPaid()), 'status' => $status['name'], 'type' => $order->module, 'order_date' => date(DATE_ISO8601, strtotime($order->date_add)), 'currency' => $currency->iso_code, 'billing' => self::getAddress(new Address($order->id_address_invoice)), 'shipping' => self::checkoutShipping($order));
}
return $history;
}
示例2: loadData
/**
* Loads the order status data from the order model.
*
* @param Order $order the model.
*/
public function loadData(Order $order)
{
// We prefer to use the English state name for the status code, as we use it as an unique identifier of that
// particular order status. The status label will primarily be in the language of the order.
$id_lang = (int) Language::getIdByIso('en');
if (empty($id_lang)) {
$id_lang = (int) $order->id_lang;
}
$state = $order->getCurrentStateFull($id_lang);
if (!empty($state['name'])) {
$state_name = $state['name'];
$this->code = $this->convertNameToCode($state_name);
if ($id_lang !== (int) $order->id_lang) {
$state = $order->getCurrentStateFull((int) $order->id_lang);
if (!empty($state['name'])) {
$state_name = $state['name'];
}
}
$this->label = $state_name;
}
}
示例3: hookPaymentReturn
public function hookPaymentReturn($params)
{
global $cookie;
global $smarty;
$order_id = (int) Tools::getValue('id_order');
$order = new Order($order_id);
$state = $order->getCurrentStateFull((int) $cookie->id_lang);
$carrier = new Carrier($order->id_carrier, (int) $cookie->id_lang);
$smarty->assign(array('order' => $order, 'total_paid' => Tools::displayPrice($order->total_paid), 'state' => $state, 'carrier' => $carrier, 'order_id_formatted' => sprintf('#%06d', $order_id)));
return $this->_fetchTemplate('views/templates/hook/payment_return.tpl');
}
示例4: getHistory
public function getHistory(Customer $customer, $limit)
{
$history_collection = Db::getInstance()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'orders ' . ' WHERE id_customer = ' . $customer->id . ' ' . ' ORDER BY id_order DESC LIMIT ' . $limit);
$history = array();
foreach ($history_collection as $order_history) {
$Order = new Order($order_history['id_order']);
$Currency = new Currency($Order->id_currency);
$currency = $Currency->iso_code;
$BillingAddress = new Address($Order->id_address_invoice);
$status = $Order->getCurrentStateFull(Context::getContext()->language->id);
$history[] = array("id" => $Order->id_cart, "amount" => static::formatDecimals($this->_orderTotal($Order)), "due" => static::formatDecimals($this->_orderTotal($Order)), "status" => $status['name'], "type" => $Order->module, "order_date" => date(DATE_ISO8601, strtotime($Order->date_add)), "currency" => $currency, "billing" => $this->_getAddr($BillingAddress), "shipping" => $this->getShipping($Order));
}
return $history;
}
示例5: hookPaymentReturn
public function hookPaymentReturn($params)
{
$order_id = Tools::getValue('id_order');
$order = new Order($order_id);
$state = $order->getCurrentStateFull($this->context->language->id);
$carrier = new Carrier($order->id_carrier, $this->context->language->id);
$this->smarty->assign(array('order' => $order, 'total_paid' => Tools::displayPrice($order->total_paid_tax_incl), 'state' => $state, 'carrier' => $carrier, 'order_id_formatted' => sprintf('#%06d', $order_id)));
return $this->_fetchTemplate('views/templates/hook/payment_return.tpl');
}