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


PHP Mage_Sales_Model_Order::getIncrementId方法代码示例

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


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

示例1: getOrderIncrementId

 /**
  * Get the original order's increment ID
  * 
  * @return string
  */
 public function getOrderIncrementId()
 {
     if (!is_null($this->_storedOrder)) {
         return $this->_storedOrder->getIncrementId();
     }
     return '';
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:12,代码来源:Orderstored.php

示例2: _getAnswerToGateWay

 /**
  * @return string JSON encoded answer to the WayForPay gateway
  */
 protected function _getAnswerToGateWay()
 {
     $responseToGateway = array('orderReference' => $this->_order->getIncrementId(), 'status' => 'accept', 'time' => time());
     $sign = array();
     foreach ($responseToGateway as $dataKey => $dataValue) {
         $sign[] = $dataValue;
     }
     $sign = implode(WayForPay_Payment_Helper_Data::SIGNATURE_SEPARATOR, $sign);
     $sign = hash_hmac('md5', $sign, $this->_paymentMethod->getConfigData('secret_key'));
     $responseToGateway['signature'] = $sign;
     return json_encode($responseToGateway);
 }
开发者ID:alexkuk,项目名称:Magento,代码行数:15,代码来源:ResponseProcessor.php

示例3: is_aplazame_payment

 /**
  * @param Mage_Sales_Model_Order $order
  * @return bool
  */
 protected function is_aplazame_payment($order)
 {
     $code = Aplazame_Aplazame_Model_Payment::METHOD_CODE;
     /** @var Mage_Sales_Model_Order $parentOrder */
     $parentOrder = Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId());
     return $code == $parentOrder->getPayment()->getMethod();
 }
开发者ID:aplazame,项目名称:magento,代码行数:11,代码来源:Observer.php

示例4: processOrder

 /**
  * Processes payment for specified order
  * @param Mage_Sales_Model_Order $Order
  * @return
  */
 public function processOrder(Mage_Sales_Model_Order $PrimaryOrder, Mage_Sales_Model_Order $Order = null)
 {
     $amount = $Order->getGrandTotal();
     $increment = $Order->getIncrementId();
     $VendorTxCode = $increment . "-" . date("y-m-d-H-i-s", time()) . "-" . rand(0, 1000000);
     $model = Mage::getModel('sarp/protxDirect')->load($this->getSubscription()->getId(), 'subscription_id');
     $data = array('VPSProtocol' => self::PROTOCOL_VERSION, 'TxType' => self::REPEAT, 'Vendor' => Mage::getStoreConfig(self::VENDOR), 'VendorTxCode' => $VendorTxCode, 'Amount' => $amount, 'Currency' => $Order->getOrderCurrencyCode(), 'Description' => 'Order', 'RelatedVPSTxId' => $model->getVpsTxId(), 'RelatedVendorTxCode' => $model->getVendorTxCode(), 'RelatedSecurityKey' => $model->getSecurityKey(), 'RelatedTxAuthNo' => $model->getTxAuthNo());
     $ready = array();
     foreach ($data as $key => $value) {
         $ready[] = $key . '=' . $value;
     }
     $str = implode('&', $ready);
     switch (Mage::getStoreConfig(self::MODE)) {
         case 'test':
             $url = self::TEST_REPEAT_URL;
             break;
         case 'live':
             $url = self::LIVE_REPEAT_URL;
             break;
         default:
             $url = self::SIMULATOR_REPEAT_URL;
     }
     $ready = $this->requestPost($url, $str);
     if (empty($ready)) {
         throw new AW_Sarp_Exception($this->__("Order cannot be completed. Unknown error"));
     }
     if ($ready['Status'] != 'OK') {
         throw new AW_Sarp_Exception($ready['Status'] . " - " . $ready['StatusDetail']);
     }
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:35,代码来源:ProtxDirect.php

示例5: createByApiResponse

 /**
  * @param Mage_Sales_Model_Order $order
  * @param Payone_Api_Response_Interface $response
  * @param Payone_Api_Request_Interface $request
  * @throws Payone_Core_Exception_TransactionAlreadyExists
  * @return null|Payone_Core_Model_Domain_Transaction
  */
 public function createByApiResponse(Mage_Sales_Model_Order $order, Payone_Api_Response_Interface $response, Payone_Api_Request_Interface $request)
 {
     $transaction = $this->getFactory()->getModelTransaction();
     $transaction->load($response->getTxid(), 'txid');
     // should not exist but to be sure load by txid
     if ($transaction->hasData()) {
         throw new Payone_Core_Exception_TransactionAlreadyExists($response->getTxid());
     }
     $transaction->setTxid($response->getTxid());
     $transaction->setLastTxaction($response->getStatus());
     $transaction->setUserid($response->getUserid());
     $transaction->setStoreId($order->getStoreId());
     $transaction->setOrderId($order->getId());
     $transaction->setReference($order->getIncrementId());
     $transaction->setCurrency($order->getOrderCurrencyCode());
     $transaction->setCustomerId($order->getCustomerId());
     $transaction->setClearingtype($request->getClearingtype());
     $transaction->setMode($request->getMode());
     $transaction->setMid($request->getMid());
     $transaction->setAid($request->getAid());
     $transaction->setPortalid($request->getPortalid());
     $transaction->setLastSequencenumber(0);
     $data = $response->toArray();
     $transaction->addData($data);
     $transaction->save();
     return $transaction;
 }
开发者ID:romfr,项目名称:payone-magento,代码行数:34,代码来源:Create.php

示例6: getOrderItemValue

 /**
  * Retrieve order item value by key
  *
  * @param Mage_Sales_Model_Order $order
  * @param string $key
  * @return string
  */
 public function getOrderItemValue(Mage_Sales_Model_Order $order, $key)
 {
     $escape = true;
     switch ($key) {
         case 'order_increment_id':
             $value = $order->getIncrementId();
             break;
         case 'created_at':
             $value = $this->helper('core')->formatDate($order->getCreatedAt(), 'short', true);
             break;
         case 'shipping_address':
             $value = $order->getShippingAddress() ? $this->htmlEscape($order->getShippingAddress()->getName()) : $this->__('N/A');
             break;
         case 'order_total':
             $value = $order->formatPrice($order->getGrandTotal());
             $escape = false;
             break;
         case 'status_label':
             $value = $order->getStatusLabel();
             break;
         case 'view_url':
             $value = $this->getUrl('*/order/view', array('order_id' => $order->getId()));
             break;
         default:
             $value = $order->getData($key) ? $order->getData($key) : $this->__('N/A');
     }
     return $escape ? $this->escapeHtml($value) : $value;
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:35,代码来源:View.php

示例7: generateOrderArray

 public function generateOrderArray(Mage_Sales_Model_Order $order)
 {
     $array = array('@context' => 'http://schema.org', '@type' => 'Order', 'merchant' => array('@type' => 'Organization', 'name' => $order->getStore()->getFrontendName()), 'orderNumber' => $order->getIncrementId(), 'priceCurrency' => $order->getOrderCurrency()->toString(), 'price' => (string) number_format($order->getBaseTotalDue(), 2), 'acceptedOffer' => $this->generateAcceptedOfferArray($order));
     if (!$order->getCustomerIsGuest()) {
         $array['url'] = $this->getViewOrderUrl($order);
     }
     return $array;
 }
开发者ID:salsero35,项目名称:gmailactions,代码行数:8,代码来源:Gmailactions.php

示例8: prepateWithOrder

 /**
  * Adds information to based on the order object inside magento
  *
  * @param Mage_Sales_Model_Order $order
  * @return Bitpay_Core_Model_Invoice
  */
 public function prepateWithOrder($order)
 {
     if (false === isset($order) || true === empty($order)) {
         \Mage::helper('bitpay')->debugData('[ERROR] In Bitpay_Core_Model_Invoice::prepateWithOrder(): Missing or empty $order parameter.');
         throw new \Exception('In Bitpay_Core_Model_Invoice::prepateWithOrder(): Missing or empty $order parameter.');
     }
     $this->addData(array('quote_id' => $order->getQuoteId(), 'increment_id' => $order->getIncrementId()));
     return $this;
 }
开发者ID:sanjay-wagento,项目名称:magento-plugin,代码行数:15,代码来源:Invoice.php

示例9: _printPdf

 /**
  * Send PDF to customer, add status history comment to order.
  *
  * @param stdClass $response
  * @param Mage_Sales_Model_Order $order
  * @return Dhl_OnlineRetoure_AddressController
  */
 protected function _printPdf(stdClass $response, Mage_Sales_Model_Order $order)
 {
     $localeDate = Mage::app()->getLocale()->date($response->issueDate);
     $filenameDate = Mage::getSingleton('core/date')->date('Y-m-d', $response->issueDate);
     $this->_prepareDownloadResponse(sprintf("%s_Return_%s_%s.pdf", str_replace(" ", "_", Mage::app()->getStore()->getName()), $order->getIncrementId(), $filenameDate), base64_decode($response->label), 'application/pdf');
     $comment = 'Return label with ident code (IDC) %s successfully created on %s.';
     $order->addStatusHistoryComment($this->__($comment, $response->idc, $localeDate))->setIsVisibleOnFront(true)->save();
     Mage::helper("dhlonlineretoure/validate")->logSuccess();
     return $this;
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:17,代码来源:AddressController.php

示例10: getReviewVendorUrl

 public function getReviewVendorUrl(Mage_Sales_Model_Order $order, $vendorId)
 {
     $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
     if ($orderId = $order->getIncrementId()) {
         if ($customerId = $customer->getId()) {
             $url = Mage::getUrl('vendor/review/write', array('vendor_id' => $vendorId, 'customer_id' => $customerId, 'order_id' => $orderId, 'hash' => $this->hashKey($customerId, $vendorId, $orderId)));
             return $url;
         }
     }
     return '';
 }
开发者ID:shashankkanungo,项目名称:magento,代码行数:11,代码来源:Data.php

示例11: addPaymentsToPayload

 /**
  * Make stored value card payloads for any redeemed
  * gift cards
  *
  * @param Mage_Sales_Model_Order $order
  * @param IPaymentContainer      $paymentContainer
  * @param SplObjectStorage       $processedPayments
  */
 public function addPaymentsToPayload(Mage_Sales_Model_Order $order, IPaymentContainer $paymentContainer, SplObjectStorage $processedPayments)
 {
     foreach ($this->_giftcardContainer->getRedeemedGiftcards() as $giftcard) {
         $iterable = $paymentContainer->getPayments();
         $payload = $iterable->getEmptyStoredValueCardPayment();
         $payload->setOrderId($order->getIncrementId())->setTenderType($giftcard->getTenderType())->setAccountUniqueId($giftcard->getCardNumber())->setPanIsToken((bool) $giftcard->getPanIsToken())->setCreateTimestamp($giftcard->getRedeemedAt())->setAmount($giftcard->getAmountRedeemed())->setPin($giftcard->getPin())->setPaymentRequestId($giftcard->getRedeemRequestId());
         // add the new payload
         $iterable->OffsetSet($payload, $payload);
         // put the payment in the processed payments set
         $processedPayments->attach($giftcard);
     }
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:20,代码来源:Payment.php

示例12: crateFromOrder

 public static function crateFromOrder(Mage_Sales_Model_Order $order)
 {
     $aOrder = new self();
     $aOrder->id = $order->getIncrementId();
     $aOrder->currency = $order->getOrderCurrencyCode();
     $aOrder->total_amount = Aplazame_Sdk_Serializer_Decimal::fromFloat($order->getTotalDue());
     $aOrder->articles = array_map(array('Aplazame_Aplazame_BusinessModel_Article', 'crateFromOrderItem'), $order->getAllVisibleItems());
     if (($discounts = $order->getDiscountAmount()) !== null) {
         $aOrder->discount = Aplazame_Sdk_Serializer_Decimal::fromFloat(-$discounts);
     }
     return $aOrder;
 }
开发者ID:aplazame,项目名称:magento,代码行数:12,代码来源:Order.php

示例13: _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

示例14: getLastRealOrder

 /**
  * Get order instance based on last order ID
  *
  * @return Mage_Sales_Model_Order
  */
 public function getLastRealOrder()
 {
     $orderId = $this->getLastRealOrderId();
     if ($this->_order !== null && $orderId == $this->_order->getIncrementId()) {
         return $this->_order;
     }
     $this->_order = $this->_getOrderModel();
     if ($orderId) {
         $this->_order->loadByIncrementId($orderId);
     }
     return $this->_order;
 }
开发者ID:okite11,项目名称:frames21,代码行数:17,代码来源:Session.php

示例15: autoExportJobs

 /** Send order to MailChimp Automatically by Order Status
  *
  *
  */
 public function autoExportJobs()
 {
     $allow_sent = false;
     $orderIds[] = '0';
     $ecommerceOrders = Mage::getModel('monkey/ecommerce')->getCollection()->getData();
     if ($ecommerceOrders) {
         foreach ($ecommerceOrders as $ecommerceOrder) {
             $orderIds[] = $ecommerceOrder['order_id'];
         }
     }
     $orders = Mage::getResourceModel('sales/order_collection');
     //Get ALL orders which has not been sent to MailChimp
     $orders->getSelect()->where('main_table.entity_id NOT IN(?)', $orderIds);
     //Get status options selected in the Configuration
     $states = explode(',', Mage::helper('monkey')->config('order_status'));
     foreach ($orders as $order) {
         foreach ($states as $state) {
             if ($order->getStatus() == $state || $state == 'all_status') {
                 $allow_sent = true;
             }
         }
         if ($allow_sent == true) {
             $this->_order = $order;
             $api = Mage::getSingleton('monkey/api', array('store' => $this->_order->getStoreId()));
             if (!$api) {
                 return false;
             }
             $subtotal = $this->_order->getSubtotal();
             $discount = (double) $this->_order->getDiscountAmount();
             if ($discount != 0) {
                 $subtotal = $subtotal + $discount;
             }
             $this->_info = array('id' => $this->_order->getIncrementId(), 'total' => $subtotal, 'shipping' => $this->_order->getShippingAmount(), 'tax' => $this->_order->getTaxAmount(), 'store_id' => $this->_order->getStoreId(), 'store_name' => $this->_order->getStoreName(), 'plugin_id' => 1215, 'items' => array());
             $email = $this->_order->getCustomerEmail();
             $campaign = $this->_order->getEbizmartsMagemonkeyCampaignId();
             $this->setItemstoSend();
             if ($email && $campaign) {
                 $this->_info['email_id'] = $email;
                 $this->_info['campaign_id'] = $campaign;
                 //Send order to MailChimp
                 $rs = $api->campaignEcommOrderAdd($this->_info);
             } else {
                 $this->_info['email'] = $email;
                 $rs = $api->ecommOrderAdd($this->_info);
             }
             $allow_sent = false;
             if ($rs === TRUE) {
                 $this->_logCall();
             }
         }
     }
 }
开发者ID:technomagegithub,项目名称:inmed-magento,代码行数:56,代码来源:Ecommerce360.php


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