簡體   English   中英

Magento訂購電子郵件

[英]Magento Order Emails

我正在使用magento 1.7。有人可以對此提供幫助/建議嗎?

還使用EPDQ Barclaycard模塊。

捕獲付款似乎一切正常,但是當我結帳時,請填寫所有詳細信息,直到“付款信息”選擇卡類型並點擊“繼續”,然后下訂單已發送新訂單電子郵件,但尚未付款!

無論如何,在通過Barclaycard捕獲付款之前,可以防止這種情況發生嗎?

我錯過了什么嗎?

提前致謝

Magento在下訂單后立即發送電子郵件訂單確認。 如果您在下訂單但未付款后將用戶重定向到付款網關,則需要修改付款模塊以使用magento的付款重定向設置來使其忽略確認電子郵件(請參閱Mage_Checkout_Model_Type_OnepagesaveOrder()方法) )。

您應該看到一些類似的代碼;

/**
 * a flag to set that there will be redirect to third party after confirmation
 * eg: paypal standard ipn
 */
$redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();
/**
 * we only want to send to customer about new order when there is no redirect to third party
 */
if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {
    try {
        $order->sendNewOrderEmail();
    } catch (Exception $e) {
        Mage::logException($e);
    }
}

因此,這為您提供了一些選擇。 擴展您的付款模塊,以便它設置定單重定向網址,但這可能會使您的付款模塊混亂,具體取決於它的編碼方式,或者您可以將上述類擴展到您自己的模塊中(不要修改核心),覆蓋saveOrder()方法和上面所示的if語句中的付款方式檢查有點像;

if (!$redirectUrl && $order->getPayment()->getMethod() != 'your_payment_method' && $order->getCanSendNewEmailFlag()) {
    try {
        $order->sendNewOrderEmail();
    } catch (Exception $e) {
        Mage::logException($e);
    }
}

然后,您將處理IPN通知,以便在收到成功的付​​款IPN后將其發送給電子郵件,我建議您看一下Magento隨附的PayPal Standard模塊以獲取一些指示信息,因為這正是其工作原理。 令您驚訝的是,您擁有的EPDQ模塊還不能像這樣正常工作,可能值得聯系他們並重點指出問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM