本文整理汇总了PHP中Mage_Sales_Model_Order::queueNewOrderEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order::queueNewOrderEmail方法的具体用法?PHP Mage_Sales_Model_Order::queueNewOrderEmail怎么用?PHP Mage_Sales_Model_Order::queueNewOrderEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Order
的用法示例。
在下文中一共展示了Mage_Sales_Model_Order::queueNewOrderEmail方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: queueNewOrderEmail
/**
* Queue email with new order data
*
* @param bool $forceMode if true then email will be sent regardless of the fact that it was already sent previously
*
* @return Mage_Sales_Model_Order
* @throws Exception
*/
public function queueNewOrderEmail($forceMode = false)
{
if (Mage::helper('customweb_subscription/cart')->isOrderSubscription($this) || Mage::registry('customweb_subscription_recurring_order') === true) {
$this->sendNewSubscriptionOrderEmail();
} else {
parent::queueNewOrderEmail($forceMode);
}
}
示例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();
}
示例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();
}
}
示例4: queueNewOrderEmail
public function queueNewOrderEmail($forceMode = false)
{
$isDelete = false;
if (!Mage::registry('ait_send_order_email')) {
Mage::register('ait_send_order_email', 1);
// aitoc code
$isDelete = true;
}
$oResult = parent::queueNewOrderEmail($forceMode);
if ($isDelete) {
Mage::unregister('ait_send_order_email');
// aitoc code
}
return $oResult;
}
示例5: _processSale
/**
* Processes payment confirmation, creates invoice if necessary, updates order status,
* sends order confirmation to customer
*
* @param string $status
* @param string $msg Order history message
*/
protected function _processSale($status, $msg)
{
switch ($status) {
case self::MONEYBOOKERS_STATUS_SUCCESS:
$this->_createInvoice();
$this->_order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $msg);
// save transaction ID
$this->_order->getPayment()->setLastTransId($this->getEventData('mb_transaction_id'));
// send new order email
$this->_order->queueNewOrderEmail();
$this->_order->setEmailSent(true);
break;
case self::MONEYBOOKERS_STATUS_PENDING:
$this->_order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true, $msg);
// save transaction ID
$this->_order->getPayment()->setLastTransId($this->getEventData('mb_transaction_id'));
break;
}
$this->_order->save();
}
示例6: _processOrder
/**
* Operate with order using information from silent post
*
* @param Mage_Sales_Model_Order $order
*/
protected function _processOrder(Mage_Sales_Model_Order $order)
{
$response = $this->getResponse();
$payment = $order->getPayment();
$payment->setTransactionId($response->getPnref())->setIsTransactionClosed(0);
$canSendNewOrderEmail = true;
if ($response->getResult() == self::RESPONSE_CODE_FRAUDSERVICE_FILTER || $response->getResult() == self::RESPONSE_CODE_DECLINED_BY_FILTER) {
$canSendNewOrderEmail = false;
$fraudMessage = $this->_getFraudMessage() ? $response->getFraudMessage() : $response->getRespmsg();
$payment->setIsTransactionPending(true)->setIsFraudDetected(true)->setAdditionalInformation('paypal_fraud_filters', $fraudMessage);
}
if ($response->getAvsdata() && strstr(substr($response->getAvsdata(), 0, 2), 'N')) {
$payment->setAdditionalInformation('paypal_avs_code', substr($response->getAvsdata(), 0, 2));
}
if ($response->getCvv2match() && $response->getCvv2match() != 'Y') {
$payment->setAdditionalInformation('paypal_cvv2_match', $response->getCvv2match());
}
switch ($response->getType()) {
case self::TRXTYPE_AUTH_ONLY:
$payment->registerAuthorizationNotification($payment->getBaseAmountAuthorized());
break;
case self::TRXTYPE_SALE:
$payment->registerCaptureNotification($payment->getBaseAmountAuthorized());
break;
}
$order->save();
try {
if ($canSendNewOrderEmail) {
$order->queueNewOrderEmail();
}
Mage::getModel('sales/quote')->load($order->getQuoteId())->setIsActive(false)->save();
} catch (Exception $e) {
Mage::throwException(Mage::helper('paypal')->__('Can not send new order email.'));
}
}
示例7: _queueNewOrderEmail
/**
* If a new email can be sent for the order, queue it to be sent.
*
* @param Mage_Sales_Model_Order
* @return self
*/
protected function _queueNewOrderEmail(Mage_Sales_Model_Order $order)
{
if ($order->getCanSendNewEmailFlag()) {
try {
$order->queueNewOrderEmail();
} catch (Exception $e) {
$this->_logger->warning('Unable to queue new order email.', $this->_logContext->getMetaData(__CLASS__, [], $e));
}
}
return $this;
}