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


PHP Mage_Sales_Model_Order::getEmailSent方法代码示例

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


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

示例1: testSendNewOrderEmail

 /**
  * @magentoConfigFixture current_store design/theme/full_name default/default/default
  * @magentoDataFixture Mage/Sales/_files/order.php
  */
 public function testSendNewOrderEmail()
 {
     $order = new Mage_Sales_Model_Order();
     $order->loadByIncrementId('100000001');
     $order->setCustomerEmail('customer@example.com');
     $payment = $order->getPayment();
     $paymentInfoBlock = Mage::helper('Mage_Payment_Helper_Data')->getInfoBlock($payment);
     $paymentInfoBlock->setArea('invalid-area');
     $payment->setBlockMock($paymentInfoBlock);
     $this->assertEmpty($order->getEmailSent());
     $order->sendNewOrderEmail();
     $this->assertNotEmpty($order->getEmailSent());
     $this->assertEquals('frontend', $paymentInfoBlock->getArea());
 }
开发者ID:nayanchamp,项目名称:magento2,代码行数:18,代码来源:OrderTest.php

示例2: _registerPaymentAuthorization

 /**
  * Register authorized payment
  */
 protected function _registerPaymentAuthorization()
 {
     $this->_importPaymentInformation();
     $this->_order->getPayment()->setPreparedMessage($this->_createIpnComment(''))->setTransactionId($this->getRequestData('txn_id'))->setParentTransactionId($this->getRequestData('parent_txn_id'))->setCurrencyCode($this->getRequestData('mc_currency'))->setIsTransactionClosed(0)->registerAuthorizationNotification($this->getRequestData('mc_gross'));
     if (!$this->_order->getEmailSent()) {
         $this->_order->queueNewOrderEmail();
     }
     $this->_order->save();
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:12,代码来源:Ipn.php

示例3: paymentSaleCompleted

 /**
  * Mark transaction as completed
  *
  * @param \PayPal\Api\WebhookEvent $webhookEvent
  */
 protected function paymentSaleCompleted(\PayPal\Api\WebhookEvent $webhookEvent)
 {
     $paymentResource = $webhookEvent->getResource();
     $parentTransactionId = $paymentResource->parent_payment;
     $payment = $this->_order->getPayment();
     $payment->setTransactionId($paymentResource->id)->setCurrencyCode($paymentResource->amount->currency)->setParentTransactionId($parentTransactionId)->setIsTransactionClosed(true)->registerCaptureNotification($paymentResource->amount->total, true);
     $this->_order->save();
     // notify customer
     $invoice = $payment->getCreatedInvoice();
     if ($invoice && !$this->_order->getEmailSent()) {
         $this->_order->queueNewOrderEmail()->addStatusHistoryComment(Mage::helper('iways_paypalplus')->__('Notified customer about invoice #%s.', $invoice->getIncrementId()))->setIsCustomerNotified(true)->save();
     }
 }
开发者ID:sickdaflip,项目名称:Iways_PayPalPlus-1.4.5,代码行数:18,代码来源:Event.php

示例4: _registerPaymentCapture

 /**
  * Process completed payment (either full or partial)
  */
 public function _registerPaymentCapture()
 {
     $session = $session = Mage::getSingleton('checkout/session');
     $purchaseId = $session->getPurchaseId();
     $this->_order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
     $payment = $this->_order->getPayment();
     $payment->setTransactionId($purchaseId)->setCurrencyCode('EUR')->setIsTransactionClosed(0)->registerCaptureNotification($this->getRequestData('amount') / 100);
     Mage::helper('sign2pay')->setStatusOnOrder($this->_order, Mage::getStoreConfig('payment/sign2pay/complete_order_status', Mage::app()->getStore()));
     $this->_order->save();
     // notify customer
     $invoice = $payment->getCreatedInvoice();
     if ($invoice && !$this->_order->getEmailSent()) {
         $this->_order->sendNewOrderEmail()->addStatusHistoryComment(Mage::helper('sign2pay')->__('Notified customer about invoice #%s.', $invoice->getIncrementId()))->setIsCustomerNotified(true)->save();
     }
     return $this;
 }
开发者ID:ArjenMiedema,项目名称:magento-sign2pay,代码行数:19,代码来源:Processor.php

示例5: _processSuccess

 /**
  * Process a succesful order. Sets its new state and status, sends an order confirmation email
  * and creates an invoice if set in config.
  *
  * @param $newStates
  * @param bool $description
  * @return bool
  */
 protected function _processSuccess($newStates, $description = false)
 {
     //send new order email if it hasnt already been sent
     if (!$this->_order->getEmailSent()) {
         $this->sendNewOrderEmail();
     }
     $this->_autoInvoice();
     $description = Mage::helper('buckaroo3extended')->__($description);
     $description .= " (#{$this->_postArray['brq_statuscode']})";
     //sets the transaction key if its defined ($trx)
     //will retrieve it from the response array, if response actually is an array
     if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
         $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
         $this->_order->save();
     }
     if ($this->_order->getState() == Mage_Sales_Model_Order::STATE_PROCESSING) {
         $this->_order->addStatusHistoryComment($description, $newStates[1])->save();
         $this->_order->setStatus($newStates[1])->save();
     } else {
         $this->_order->addStatusHistoryComment($description)->save();
     }
     return true;
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:31,代码来源:Push.php

示例6: updateCustomerData

 /**
  * Update order's customer information based on PayU information
  * @var array result data from payu with billing and shipping info
  */
 protected function updateCustomerData($data)
 {
     try {
         $customerRecord = $data;
         $this->_order->setCustomerFirstname($customerRecord->firstName);
         $this->_order->setCustomerLastname($customerRecord->lastName);
         $this->_order->setCustomerEmail($customerRecord->email);
         if (isset($data->delivery) && !empty($data->delivery)) {
             $shippingAddress = $data->delivery;
             /* $billing = $this->_order->getBillingAddress();
                
                            $billing->setCity($shippingAddress->city);
                            $billing->setStreet($shippingAddress->street);
                            $billing->setPostcode($shippingAddress->postalCode);
                            $billing->setCountryId($shippingAddress->countryCode);
                            
                            $this->_order->setBillingAddress($billing)->save(); */
             $recipient = explode(" ", $shippingAddress->recipientName);
             $shipping = $this->_order->getShippingAddress();
             $shipping->setFirstname($recipient[0]);
             $shipping->setLastname($recipient[1]);
             //$shipping->setTelephone($customerRecord['phone']);
             $shipping->setCity($shippingAddress->city);
             $shipping->setStreet($shippingAddress->street);
             $shipping->setPostcode($shippingAddress->postalCode);
             $shipping->setCountryId($shippingAddress->countryCode);
             $this->_order->setShippingAddress($shipping)->save();
         }
         /* if (isset($data['billing']) && !empty( $data['billing'] )) {
                        $billingAddress = $data['billing'];
            
                        $billing = $this->_order->getBillingAddress();
            
                        $recipient = explode(" ", $billingAddress['recipientName']);
                        
                        $billing->setFirstname($recipient[0]);
                        $billing->setLastname($recipient[1]);
                        $billing->setCompany($billingAddress['recipientName']);
                        $billing->setTelephone($customerRecord['phone']);
                        $billing->setCity($billingAddress['city']);
                        $billing->setStreet($billingAddress['street']);
                        $billing->setPostcode($billingAddress['postalCode']);
                        $billing->setCountryId($billingAddress['countryCode']);
                        //$this->_order->setCustomerTaxvat($billingAddress['TIN']);
            
                        $this->_order->setBillingAddress($billing)->save();
                    }
                    else
                    { 
                        $billing = $this->_order->getBillingAddress();
            
                        $billing->setFirstname($customerRecord['firstName']);
                        $billing->setLastname($customerRecord['lastName']);
                        $billing->setTelephone($customerRecord['phone']);
            
                        $this->_order->setBillingAddress($billing)->save();
                    }  */
         if (!$this->_order->getEmailSent()) {
             $this->_order->sendNewOrderEmail();
             $this->_order->setEmailSent(1);
         }
         $this->_order->save();
     } catch (Error $e) {
         Mage::logException("Can not update order data: " . $e);
     }
 }
开发者ID:par-orillonsoft,项目名称:plugin_magento,代码行数:70,代码来源:Payment.php

示例7: _transactionUnconfirmed

 /**
  * unconfirmed transaction
  * 
  * @param SofortLib_TransactionData $transData
  * @param Mage_Sales_Model_Order $order
  * @param boolean $forceUpdate = false to gerate update
  * @return void
  */
 private function _transactionUnconfirmed($transData, $order, $forceUpdate = false)
 {
     $payment = $order->getPayment();
     $transaction = $transData->getTransaction();
     $statusReason = $transData->getStatusReason();
     // rechnung
     if ($transData->isSofortrechnung() && ($statusReason == 'confirm_invoice' || $forceUpdate)) {
         $order->setState('sofort');
         //customer may have changed the address during payment process
         $address = $transData->getInvoiceAddress();
         $order->getBillingAddress()->setStreet($address['street'] . ' ' . $address['street_number'])->setFirstname($address['firstname'])->setLastname($address['lastname'])->setCompany($address['company'])->setPostcode($address['zipcode'])->setCity($address['city'])->setCountryId($address['country_code']);
         $address = $transData->getShippingAddress();
         $order->getShippingAddress()->setStreet($address['street'] . ' ' . $address['street_number'])->setFirstname($address['firstname'])->setLastname($address['lastname'])->setCompany($address['company'])->setPostcode($address['zipcode'])->setCity($address['city'])->setCountryId($address['country_code']);
         $order->save();
         $waitingStatus = Mage::getStoreConfig('payment/sofort/sofortrechnung_order_status_waiting');
         if ($waitingStatus == 'unchanged') {
             $order->addStatusHistoryComment(Mage::helper('pnsofortueberweisung')->__('Payment successfull. Invoice needs to be confirmed.', $transaction))->setIsCustomerNotified(true);
         } else {
             $order->addStatusHistoryComment(Mage::helper('pnsofortueberweisung')->__('Payment successfull. Invoice needs to be confirmed.', $transaction), $waitingStatus)->setIsCustomerNotified(true);
         }
         $order->setIsVisibleOnFront(true);
         if (!$order->getEmailSent()) {
             $order->setEmailSent(true);
             $order->save();
             $order->sendNewOrderEmail();
         }
     } else {
         // mark for notify
         $order->setState('sofort');
     }
     $order->save();
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:40,代码来源:SofortController.php

示例8: _processAuthorize

 /**
  * Process Configured Payment Actions: Authorized, Default operation
  * just place order
  *
  * @param Mage_Sales_Model_Order $order Order
  * @param array $params Request params
  */
 protected function _processAuthorize($order, $params)
 {
     $status = $params['STATUS'];
     if ($status == Netresearch_OPS_Model_Payment_Abstract::OPS_AWAIT_CUSTOMER_PAYMENT) {
         $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('ops')->__('Waiting for payment. Barclaycard status: %s.', Mage::helper('ops')->getStatusText($status)));
         // send new order mail for bank transfer, since it is 'successfully' authorized at this point
         if ($order->getPayment()->getMethodInstance() instanceof Netresearch_OPS_Model_Payment_BankTransfer && $order->getEmailSent() != 1) {
             $order->sendNewOrderEmail();
         }
     } elseif ($status == Netresearch_OPS_Model_Payment_Abstract::OPS_AUTHORIZED_WAITING) {
         $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('ops')->__('Authorization uncertain. Barclaycard status: %s.', Mage::helper('ops')->getStatusText($status)));
     } else {
         // for 3DS payments the order has to be retrieved from the payment review step
         if ($this->isInlinePayment($order->getPayment()) && 0 < strlen(trim($order->getPayment()->getAdditionalInformation('HTML_ANSWER'))) && $order->getPayment()->getAdditionalInformation('status') == Netresearch_OPS_Model_Payment_Abstract::OPS_AUTHORIZED) {
             $order->getPayment()->setIsTransactionApproved(true)->registerPaymentReviewAction(Mage_Sales_Model_Order_Payment::REVIEW_ACTION_UPDATE, true)->save();
         }
         if ($this->isRedirectPaymentMethod($order) === true && $order->getEmailSent() != 1) {
             $order->sendNewOrderEmail();
         }
         $payId = $params['PAYID'];
         $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PROCESSING, Mage::helper('ops')->__('Processed by Barclaycard. Payment ID: %s. Barclaycard status: %s.', $payId, Mage::helper('ops')->getStatusText($status)));
     }
     $order->save();
 }
开发者ID:roshu1980,项目名称:add-computers,代码行数:31,代码来源:Payment.php


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