douxianliu6756 2014-08-04 10:31
浏览 39
已采纳

Magento Recurring个人资料成功页面

I'm trying to configure Magento so that if it's a recurring payment through Paypal it goes to a different checkout success page than if it was a normal order, I have found the below in the file /app/code/core/Mage/Paypal/Controller/Express/Abstract.php

Could I do a statement to say if recurring payment then redirect to xxxx.html else redirect checkout/onepage/success?

 // recurring profiles may be created along with the order or without it
        $profiles = $this->_checkout->getRecurringPaymentProfiles();
        if ($profiles) {
            $ids = array();
            foreach($profiles as $profile) {
                $ids[] = $profile->getId();
            }
            $session->setLastRecurringProfileIds($ids);

        }

        // redirect if PayPal specified some URL (for example, to Giropay bank)
        $url = $this->_checkout->getRedirectUrl();
        if ($url) {
            $this->getResponse()->setRedirect($url);
            return;
        }
        $this->_initToken(false); // no need in token anymore
        $this->_redirect('checkout/onepage/success/');
        return;
  • 写回答

1条回答 默认 最新

  • duandu1915 2014-08-04 13:44
    关注

    Sure,

    I think you can add an EventObserver on either

    sales_order_save_before
    

    or

    sales_order_place_before
    

    Then do your if-statements and place an redirect there.

    You can probably also rewrite the

    public function saveOrderAction()
    

    In

    Mage_Checkout_OnepageController
    

    HTH

    Good Luck

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制