当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Order::getStatus方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Order::getStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order::getStatus方法的具体用法?PHP Mage_Sales_Model_Order::getStatus怎么用?PHP Mage_Sales_Model_Order::getStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Order的用法示例。


在下文中一共展示了Mage_Sales_Model_Order::getStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cancelaPedido

 public function cancelaPedido(Mage_Sales_Model_Order $order)
 {
     $paymentMethod = $order->getPayment()->getMethodInstance()->getCode();
     $listPaymentMethodsIdeasa = Mage::helper('base')->listPaymentMethods();
     $this->logger->info('Processando cancelamento do pedido ' . $order->getRealOrderId() . ', do modulo: ' . $paymentMethod);
     try {
         if ($order->getState() != Mage_Sales_Model_Order::STATE_CANCELED) {
             $order->cancel();
             //força o cancelamento
             if ($order->getStatus() != Mage_Sales_Model_Order::STATE_CANCELED) {
                 $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, Mage::helper('base')->__('Pedido cancelado'), $notified = false);
             } else {
                 $order->addStatusToHistory($order->getStatus(), Mage::helper('base')->__('Pedido cancelado.'));
             }
             if ($order->hasInvoices() != '') {
                 $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, Mage::helper('base')->__('O pagamento e o pedido foram cancelados, mas não foi possível retornar os produtos ao estoque pois já havia uma fatura gerada para este pedido.'), $notified = false);
             }
             $order->save();
         }
         if (Mage::helper('base')->isIdeasaPaymentMethod($paymentMethod) && Mage::helper('base/module')->isPagSeguroDiretoExists() && $paymentMethod == $listPaymentMethodsIdeasa[0]) {
             Mage::getModel('pagsegurodireto/notification')->sendEmail($order);
         }
     } catch (Exception $e) {
         $this->logger->error("Erro ao cancelar pedido {$orderId} \n {$e->__toString}()");
     }
     $this->logger->info('Cancelamento do pedido foi concluido ' . $order->getRealOrderId() . ', do modulo: ' . $paymentMethod);
     return;
 }
开发者ID:adrianomelo5,项目名称:magento,代码行数:28,代码来源:ExpiraPedido.php

示例2: _prepareOrderData

 /**
  * @return array
  */
 protected function _prepareOrderData()
 {
     // magento 1.5 compat
     $shipping_method_c = $this->_order->getShippingMethod(true);
     $shipping_method = $this->_order->getData('shipping_method');
     $shipping_method_code = $shipping_method_c ? $shipping_method_c->getData('carrier_code') : $shipping_method;
     $data = array_filter(array('currency_code' => $this->_order->getOrderCurrencyCode(), 'shipping_method_code' => $shipping_method_code, 'shipping_method_title' => $this->_order->getShippingDescription(), 'created_on' => $this->_order->getCreatedAt(), 'updated_on' => $this->_order->getUpdatedAt(), 'state' => $this->_order->getState(), 'status' => $this->_order->getStatus(), 'is_gift' => $this->_order->getGiftMessageId() != null, 'ref_quote_id' => $this->_order->getQuoteId(), 'order_subtotal_with_tax' => $this->_order->getSubtotalInclTax(), 'order_subtotal' => $this->_order->getSubtotal(), 'order_tax' => $this->_order->getTaxAmount(), 'order_hidden_tax' => $this->_order->getHiddenTaxAmount(), 'order_shipping_with_tax' => $this->_order->getShippingInclTax(), 'order_shipping' => $this->_order->getShippingAmount(), 'order_discount' => $this->_order->getDiscountAmount(), 'order_shipping_discount' => $this->_order->getShippingDiscountAmount(), 'order_total' => $this->_order->getGrandTotal(), 'order_total_items' => $this->_order->getTotalItemCount()));
     return $data;
 }
开发者ID:payin7-payments,项目名称:payin7-magento,代码行数:12,代码来源:Submit.php

示例3: isOrderArchiveable

 /**
  * Check order archiveablility for single archiving
  *
  * @param Mage_Sales_Model_Order $order
  * @param boolean $checkAge check order age for archive
  * @return boolean
  */
 public function isOrderArchiveable($order, $checkAge = false)
 {
     if (in_array($order->getStatus(), $this->getArchiveOrderStatuses())) {
         if ($checkAge) {
             $now = Mage::app()->getLocale()->storeDate();
             $updated = Mage::app()->getLocale()->storeDate($order->getUpdatedAt());
         }
         return true;
     }
     return false;
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:18,代码来源:Config.php

示例4: _sendDoubleTransactionEmail

 /**
  * Send the shop owner and subscribers to the debug-email an email with the message that there is a double transaction
  */
 protected function _sendDoubleTransactionEmail()
 {
     $helper = Mage::helper('buckaroo3extended');
     $orderId = $this->_order->getIncrementId();
     $currentOrderStatus = $this->_order->getStatus();
     $recipients = explode(',', Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->getStoreId()));
     $recipients[] = Mage::getStoreConfig('trans_email/ident_general/email');
     $mail = $helper->__('Status Success received for order %s while the order currently the status %s has.', $orderId, $currentOrderStatus);
     foreach ($recipients as $recipient) {
         mail(trim($recipient), 'Dubbele transactie voor dezelfde order', $mail);
     }
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:15,代码来源:Push.php

示例5: canMakePayment

 /**
  * Check if can make payment for order
  *
  * @param Mage_Sales_Model_Order $order
  * @return bool
  */
 public function canMakePayment($order)
 {
     if ($order->getPayment() && $order->getPayment()->getMethod() == 'purchaseorder' && $order->canShip()) {
         return false;
     }
     if ($order->getStatus() != 'purchaseorder_pending_payment') {
         return false;
     }
     if (!$order->canInvoice()) {
         return false;
     }
     return true;
 }
开发者ID:flintdigital,项目名称:mage-mod-ar-po-emja,代码行数:19,代码来源:Data.php

示例6: flush

 public function flush(Mage_Sales_Model_Order $order, $historyEntity)
 {
     $collection = Mage::registry(DEG_OrderLifecycle_Model_Lifecycle_Event_Collection::REGISTRY_LIFECYCLE_EVENT_COLLECTION);
     //TODO wrap in a transaction
     if ($collection) {
         foreach ($collection->getEvents() as $event) {
             $comment = $this->formatEventData($event);
             $history = Mage::getModel('sales/order_status_history');
             $history->setParentId($order->getId());
             $history->setStatus($order->getStatus());
             $history->setComment($comment);
             $history->setIsCustomerNotified(0);
             $history->setIsVisibleOnFront(0);
             $history->setEntityName($historyEntity);
             $history->save();
         }
         Mage::unregister(DEG_OrderLifecycle_Model_Lifecycle_Event_Collection::REGISTRY_LIFECYCLE_EVENT_COLLECTION);
     }
 }
开发者ID:beejhuff,项目名称:magento-order-lifecycle,代码行数:19,代码来源:History.php

示例7: logRequest

 /**
  * @param Mage_Sales_Model_Order $order
  * @param string                 $uri
  * @param string                 $method
  * @param string                 $body
  */
 public function logRequest(Mage_Sales_Model_Order $order = null, $uri, $method, $body)
 {
     if (!$this->isApiLogEnabled()) {
         return;
     }
     $message = $this->getDashHash();
     $message .= PHP_EOL;
     $message .= PHP_EOL . 'Starting Request';
     $message .= PHP_EOL . 'Request Data:';
     $message .= PHP_EOL;
     if ($order && $order->getId()) {
         $message .= PHP_EOL . sprintf('Order ID:      %s', $order->getId());
         $message .= PHP_EOL . sprintf('Order Real ID: %s', $order->getRealOrderId());
         $message .= PHP_EOL . sprintf('Order State:   %s', $order->getState());
         $message .= PHP_EOL . sprintf('Order Status:  %s', $order->getStatus());
     }
     $message .= PHP_EOL . sprintf('URI:           %s', $uri);
     $message .= PHP_EOL . sprintf('Method:        %s', $method);
     $message .= PHP_EOL . sprintf('Request Body:  %s', $body);
     $message .= PHP_EOL;
     $message .= $this->getShortDashHash();
     $this->log($message);
 }
开发者ID:Tracksale,项目名称:tracksale-magento,代码行数:29,代码来源:Log.php

示例8: checkForOpsStateOnStatusUpdate

 /**
  * checks if the order's state is valid for the according Barclaycard's status. If not the order's state is reset
  * to it's previous state
  *
  * @param Mage_Sales_Model_Order $order
  *
  * @return $this
  */
 public function checkForOpsStateOnStatusUpdate(Mage_Sales_Model_Order $order)
 {
     $opsStatus = $order->getPayment()->getAdditionalInformation('status');
     $opsOrderStates = $this->getStatusMappingModel()->getStatusForOpsStatus($opsStatus);
     $origData = $order->getOrigData();
     if (0 < count($opsOrderStates) && !in_array($order->getStatus(), $opsOrderStates)) {
         $comment = $this->getDataHelper()->__('revert state update to it\'s original one because of Barclaycard\'s state restriction');
         $order->addStatusHistoryComment($comment, $origData['status']);
     }
     return $this;
 }
开发者ID:roshu1980,项目名称:add-computers,代码行数:19,代码来源:Order.php

示例9: responseAction

 public function responseAction()
 {
     require_once 'Zend/Crypt/Hmac.php';
     $txnid = "";
     $txnrefno = "";
     $txnstatus = "";
     $txnmsg = "";
     $firstName = "";
     $lastName = "";
     $email = "";
     $street1 = "";
     $city = "";
     $state = "";
     $country = "";
     $pincode = "";
     $mobileNo = "";
     $signature = "";
     $reqsignature = "";
     $data = "";
     $txnGateway = "";
     $paymentMode = "";
     $maskedCardNumber = "";
     $cardType = "";
     $flag = "dataTampered";
     $order = $this->getOrder();
     $orderAmount = round($order->getData('grand_total'), 2);
     $config = Mage::getSingleton('citrus/config');
     $secretKey = $config->getSecretKey();
     $session = Mage::getSingleton('checkout/session');
     if ($_POST) {
         if (isset($_POST['TxId'])) {
             $txnid = $_POST['TxId'];
             $data .= $txnid;
         }
         if (isset($_POST['TxStatus'])) {
             $txnstatus = $_POST['TxStatus'];
             $data .= $txnstatus;
         }
         if (isset($_POST['amount'])) {
             $amount = $_POST['amount'];
             $data .= $amount;
         }
         if (isset($_POST['pgTxnNo'])) {
             $pgtxnno = $_POST['pgTxnNo'];
             $data .= $pgtxnno;
         }
         if (isset($_POST['issuerRefNo'])) {
             $issuerrefno = $_POST['issuerRefNo'];
             $data .= $issuerrefno;
         }
         if (isset($_POST['authIdCode'])) {
             $authidcode = $_POST['authIdCode'];
             $data .= $authidcode;
         }
         if (isset($_POST['firstName'])) {
             $firstName = $_POST['firstName'];
             $data .= $firstName;
         }
         if (isset($_POST['lastName'])) {
             $lastName = $_POST['lastName'];
             $data .= $lastName;
         }
         if (isset($_POST['pgRespCode'])) {
             $pgrespcode = $_POST['pgRespCode'];
             $data .= $pgrespcode;
         }
         if (isset($_POST['addressZip'])) {
             $pincode = $_POST['addressZip'];
             $data .= $pincode;
         }
         if (isset($_POST['signature'])) {
             $signature = $_POST['signature'];
         }
         /*signature data end*/
         $respSignature = $this->generateHmacKey($data, $secretKey);
         if ($signature != "" && strcmp($signature, $respSignature) != 0 || $orderAmount != $amount) {
             $flag = "dataTampered";
         } else {
             $flag = "dataValid";
         }
         if (strtoupper($txnstatus) != "SUCCESS") {
             $flag = "dataTampered";
         } else {
             $flag = "dataValid";
         }
     }
     $debug = Mage::getModel('citrus/api_debug')->load($TxnID, "transact_id");
     $debug->setResponseBody($data);
     $debug->save();
     if ($flag == "dataValid") {
         $_order = new Mage_Sales_Model_Order();
         $orderId = $session->getLastRealOrderId();
         $_order->loadByIncrementId($orderId);
         $_order->sendNewOrderEmail();
         try {
             $payment = $_order->getPayment();
             $payment->setTransactionId($TxnID)->capture(null);
             $_order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
             $_order->setStatus('created');
             $_order->addStatusToHistory($_order->getStatus(), Mage::helper('citrus')->__('Customer successfully returned from citrus'));
//.........这里部分代码省略.........
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:101,代码来源:StandardController.php

示例10: addCommentToOrder

 /**
  * Add comment to order
  *
  * @param  Mage_Sales_Model_Order   		$order
  * @param  string                   		$comment
  * @param  boolean  						$isShipmentSuccessfullyCreated
  *
  * @return void
  */
 public function addCommentToOrder(Mage_Sales_Model_Order $order, $comment, $isShipmentSuccessfullyCreated = false)
 {
     /*
      * for Magento 1.4.x.x
      */
     if (true === $this->getConfig()->isVersionRecommendedOrLarger()) {
         $order->addStatusHistoryComment($comment)->setIsVisibleOnFront(false)->setIsCustomerNotified(false)->save();
         /*
          * for Magento 1.3.x.x
          */
     } else {
         //Get existing order status
         $status = $order->getStatus();
         //If shipment was created successfully
         if (true === $isShipmentSuccessfullyCreated) {
             $status = Mage_Sales_Model_Order::STATE_PROCESSING;
         }
         //Is status is empty, take state
         if ($status == "") {
             $status = $order->getState();
         }
         if (false === $isShipmentSuccessfullyCreated) {
             /*
              * reload the order to avoid that unwanted order data is saved | SEE DHLIS-181
              *  Order Items are set as shipped in CE 1.3 even if there was an exception
              */
             $order = Mage::getModel('sales/order')->load($order->getId());
         }
         $order->addStatusToHistory($status, $comment)->save();
     }
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:40,代码来源:Autocreate.php

示例11: getOrderData

 /**
  * Return the order data in an array for easy processing 
  *
  * @param Mage_Sales_Model_Order $order
  * @return array
  */
 protected function getOrderData($order)
 {
     $data = array();
     $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null;
     $billingAddress = $order->getBillingAddress();
     $data['OrderNumber'] = $order->getRealOrderId();
     //$data['OrderCreated'] = Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true);
     //$data['OrderUpdated'] = Mage::helper('core')->formatDate($order->getUpdatedAt(), 'medium', true);
     //$data['OrderCreated'] = $order->getCreatedAt();
     //$data['OrderUpdated'] = $order->getUpdatedAt();
     $dateCreated = Mage::app()->getLocale()->date(strtotime($order->getCreatedAt()), null, null);
     $dateCreated = $dateCreated->toString('yyyy-MM-dd HH:mm:ss');
     $dateUpdated = Mage::app()->getLocale()->date(strtotime($order->getUpdatedAt()), null, null);
     $dateUpdated = $dateUpdated->toString('yyyy-MM-dd HH:mm:ss');
     $data['OrderCreated'] = $dateCreated;
     $data['OrderUpdated'] = $dateUpdated;
     $data['Status'] = $order->getStatus();
     $data['PurchasedFrom'] = $this->getStoreName($order);
     if (strtolower($this->getPaymentMethod($order)) == 'paytm_cc') {
         $data['PaymentMethod'] = 'Paytm-wallet';
     } else {
         if (strtolower($this->getPaymentMethod($order)) == 'payumoney_shared') {
             $data['PaymentMethod'] = 'Payumoney-wallet';
         } else {
             $data['PaymentMethod'] = $this->getPaymentMethod($order) == "free" ? 'prepaid' : $this->getPaymentMethod($order);
         }
     }
     $data['ShippingMethod'] = $this->getShippingMethod($order);
     //Shipping Provider
     $data['ShippingProvider'] = $order->getData('blinkecarrier_id');
     //$data['ExpectedDeliveryDate'] = $order->getData('shipping_arrival_date');
     $expectedDelivery = $order->getData('shipping_arrival_date');
     if (is_null($expectedDelivery)) {
         $dateDelivery = "";
     } else {
         $dateDelivery = Mage::app()->getLocale()->date(strtotime($order->getData('shipping_arrival_date')), null, null);
         $dateDelivery = $dateDelivery->toString('yyyy-MM-dd 00:00:00');
     }
     $data['ExpectedDeliveryDate'] = $dateDelivery;
     $timeSlot = $order->getData('shipping_time_slot');
     if (is_null($timeSlot)) {
         $timeSlot = "";
     }
     $data['ExpectedTimeSlot'] = $timeSlot;
     $data['Currency'] = $order->getOrderCurrencyCode();
     $data['ExchangeRate'] = $order->getBaseToOrderRate();
     $data['Subtotal'] = $order->getData('subtotal');
     $data['Tax'] = $order->getData('tax_amount');
     //VAT is for Delhi and CST for other states
     if ($shippingAddress->getRegionCode() == 'IN-DL') {
         $data['TaxCategory'] = 'VAT';
     } else {
         $data['TaxCategory'] = 'CST';
     }
     $data['ShippingAmount'] = $order->getData('shipping_amount');
     $data['Discount'] = $order->getData('discount_amount');
     $data['ShippingDiscountAmount'] = $order->getData('shipping_discount_amount');
     $data['RewardsDiscountAmount'] = $order->getData('rewards_discount_amount');
     $data['GrandTotal'] = $order->getData('grand_total');
     $data['TotalPaid'] = $order->getData('total_paid');
     $data['TotalRefunded'] = $order->getData('total_refunded');
     $data['TotalDue'] = $order->getData('total_due');
     $data['TotalInvoiced'] = $this->getTotalQtyItemsOrdered($order);
     $data['TotalQtyItemsOrdered'] = $this->getTotalQtyItemsOrdered($order);
     $data['Weight'] = $order->getWeight();
     $data['CustomerName'] = $order->getCustomerName();
     $data['CustomerFirstName'] = $order->getCustomerFirstname();
     $data['CustomerLastName'] = $order->getCustomerLastname();
     $data['CustomerMiddleName'] = $order->getCustomerMiddlename();
     $data['CustomerEmail'] = $order->getCustomerEmail();
     //Billing Address
     $data['BillToTitle'] = $billingAddress->getPrefix();
     $data['BillToName'] = $billingAddress->getName();
     $data['BillToFirstName'] = $billingAddress->getFirstname();
     $data['BillToLastName'] = $billingAddress->getLastname();
     $data['BillToMiddleName'] = $billingAddress->getMiddlename();
     $data['BillToAddressStreet'] = $billingAddress->getData("street");
     $data['BillToCity'] = $billingAddress->getData("city");
     $data['BillToRegionCode'] = $billingAddress->getRegionCode();
     $data['BillToRegion'] = $billingAddress->getRegion();
     $data['BillToCountry'] = $billingAddress->getCountry();
     $data['BillToCountryName'] = $billingAddress->getCountryModel()->getName();
     $data['BillToPostalCode'] = $billingAddress->getData("postcode");
     $billPhoneNumber = $billingAddress->getData("telephone");
     $data['BillToCustomerPhoneNum'] = $billPhoneNumber;
     $data['BillToEmail'] = $billingAddress->getData("email");
     //Shipping Address
     $data['ShipToTitle'] = $shippingAddress ? $shippingAddress->getPrefix() : '';
     $data['ShipToName'] = $shippingAddress ? $shippingAddress->getName() : '';
     $data['ShipToFirstName'] = $shippingAddress ? $shippingAddress->getFirstname() : '';
     $data['ShipToLastName'] = $shippingAddress ? $shippingAddress->getLastname() : '';
     $data['ShipToMiddleName'] = $shippingAddress ? $shippingAddress->getMiddlename() : '';
     $data['ShipToAddressStreet'] = $shippingAddress ? $shippingAddress->getData("street") : '';
     $data['ShipToCity'] = $shippingAddress ? $shippingAddress->getData("city") : '';
//.........这里部分代码省略.........
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:101,代码来源:Order.php

示例12: _processDirectSale

 /**
  * Process Configured Payment Action: Direct Sale, create invoce if state is Pending
  *
  * @param Mage_Sales_Model_Order $order  Order
  * @param array                  $params Request params
  */
 protected function _processDirectSale($order, $params, $instantCapture = 0)
 {
     Mage::register('postfinance_auto_capture', true);
     $status = $params['STATUS'];
     if ($status == PostFinance_Payment_Model_Payment_Abstract::POSTFINANCE_AWAIT_CUSTOMER_PAYMENT) {
         $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('postfinance')->__('Waiting for the payment of the customer'));
         $order->save();
     } elseif ($status == PostFinance_Payment_Model_Payment_Abstract::POSTFINANCE_AUTHORIZED_WAITING) {
         $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('postfinance')->__('Authorization waiting from PostFinance'));
         $order->save();
     } elseif ($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $instantCapture) {
         if ($status == PostFinance_Payment_Model_Payment_Abstract::POSTFINANCE_AUTHORIZED) {
             if ($order->getStatus() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
                 $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PROCESSING, Mage::helper('postfinance')->__('Processed by PostFinance'));
             }
         } else {
             $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PROCESSING, Mage::helper('postfinance')->__('Processed by PostFinance'));
         }
         if (!$order->getInvoiceCollection()->getSize()) {
             $invoice = $order->prepareInvoice();
             $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
             $invoice->register();
             $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
             $invoice->getOrder()->setIsInProcess(true);
             $invoice->save();
             $transactionSave = Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder())->save();
             /*
              * If the payment method is a redirect-payment-method send the email
              * In any other case Magento sends an email automatically in Mage_Checkout_Model_Type_Onepage::saveOrder
              */
             if ($this->isRedirectPaymentMethod($order) === true && $order->getEmailSent() !== '1') {
                 $order->sendNewOrderEmail();
             }
         }
     } else {
         $order->save();
     }
 }
开发者ID:nomade-it,项目名称:MagentoPostFinance,代码行数:44,代码来源:Payment.php

示例13: getCommonOrderValues

 /**
  * Returns the values which are identical for each row of the given order. These are
  * all the values which are not item specific: order data, shipping address, billing
  * address and order totals.
  * 
  * @param Mage_Sales_Model_Order $order The order to get values from
  * @return Array The array containing the non item specific values
  */
 protected function getCommonOrderValues($order)
 {
     $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null;
     $billingAddress = $order->getBillingAddress();
     return array($order->getRealOrderId(), Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true), $order->getStatus(), $this->getStoreName($order), $this->getPaymentMethod($order), $this->getShippingMethod($order), $this->formatPrice($order->getData('subtotal'), $order), $this->formatPrice($order->getData('tax_amount'), $order), $this->formatPrice($order->getData('shipping_amount'), $order), $this->formatPrice($order->getData('discount_amount'), $order), $this->formatPrice($order->getData('grand_total'), $order), $this->formatPrice($order->getData('base_grand_total'), $order), $this->formatPrice($order->getData('total_paid'), $order), $this->formatPrice($order->getData('total_refunded'), $order), $this->formatPrice($order->getData('total_due'), $order), $this->getTotalQtyItemsOrdered($order), $order->getCustomerName(), $order->getCustomerEmail(), $shippingAddress ? $shippingAddress->getName() : '', $shippingAddress ? $shippingAddress->getData("company") : '', $shippingAddress ? $shippingAddress->getData("street") : '', $shippingAddress ? $shippingAddress->getData("postcode") : '', $shippingAddress ? $shippingAddress->getData("city") : '', $shippingAddress ? $shippingAddress->getRegionCode() : '', $shippingAddress ? $shippingAddress->getRegion() : '', $shippingAddress ? $shippingAddress->getCountry() : '', $shippingAddress ? $shippingAddress->getCountryModel()->getName() : '', $shippingAddress ? $shippingAddress->getData("telephone") : '', $billingAddress->getName(), $billingAddress->getData("company"), $billingAddress->getData("street"), $billingAddress->getData("postcode"), $billingAddress->getData("city"), $billingAddress->getRegionCode(), $billingAddress->getRegion(), $billingAddress->getCountry(), $billingAddress->getCountryModel()->getName(), $billingAddress->getData("telephone"));
 }
开发者ID:xiaoguizhidao,项目名称:ortodon,代码行数:14,代码来源:Csv.php

示例14: createFromOrder

 /**
  * @param Mage_Sales_Model_Order $order
  *
  * @return array
  */
 public static function createFromOrder(Mage_Sales_Model_Order $order)
 {
     $serialized = array('id' => $order->getIncrementId(), 'amount' => Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getGrandTotal()), 'due' => Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getTotalDue()), 'status' => $order->getStatus(), 'type' => $order->getPayment()->getMethodInstance()->getCode(), 'order_date' => date(DATE_ISO8601, strtotime($order->getCreatedAt())), 'currency' => $order->getOrderCurrencyCode(), 'billing' => Aplazame_Aplazame_BusinessModel_Address::createFromAddress($order->getBillingAddress()), 'shipping' => Aplazame_Aplazame_BusinessModel_ShippingInfo::createFromOrder($order));
     return $serialized;
 }
开发者ID:aplazame,项目名称:magento,代码行数:10,代码来源:HistoricalOrder.php

示例15: build

 /**
  * @param PagSeguroSummaryItem $PagSeguroSummaryItem
  * @param Mage_Sales_Model_Order $order
  * @return multitype:date string NULL Ambigous <boolean, string, string, multitype:>
  */
 public function build($payment, $order)
 {
     $config = $order->getId() . '/' . $payment->getCode() . '/' . $this->getPaymentStatusFromKey($payment->getStatus()->getValue(), true);
     $checkbox = "<label class='chk_email'>";
     $checkbox .= "<input type='checkbox' name='conciliation_orders[]' class='checkbox' data-config='" . $config . "' />";
     $checkbox .= "</label>";
     // Receives the full html link to edit an order
     $editOrder = "<a class='edit' target='_blank' href='" . $this->getEditOrderUrl($order->getEntityId()) . "'>";
     $editOrder .= $this->__('Ver detalhes') . "</a>";
     return array('checkbox' => $checkbox, 'date' => $this->getOrderMagetoDateConvert($order->getCreatedAt()), 'id_magento' => "#" . $order->getIncrementId(), 'id_pagseguro' => $payment->getCode(), 'status_magento' => $this->getPaymentStatusToString($this->getPaymentStatusFromValue($order->getStatus())), 'status_pagseguro' => $this->getPaymentStatusToString($payment->getStatus()->getValue()), 'edit' => $editOrder);
 }
开发者ID:esilvajr,项目名称:magento,代码行数:16,代码来源:Conciliation.php


注:本文中的Mage_Sales_Model_Order::getStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。