Php Magento重复配置文件成功页面

Php Magento重复配置文件成功页面,php,magento,paypal,Php,Magento,Paypal,我正在尝试配置Magento,这样,如果它是通过Paypal进行的定期付款,它将转到与正常订单不同的结帐成功页面,我在文件/app/code/core/Mage/Paypal/Controller/Express/Abstract.php中找到了以下内容 我可以做一个声明,说明是否定期付款然后重定向到xxxx.html,或者重定向checkout/onepage/success // recurring profiles may be created along with the order

我正在尝试配置Magento,这样,如果它是通过Paypal进行的定期付款,它将转到与正常订单不同的结帐成功页面,我在文件/app/code/core/Mage/Paypal/Controller/Express/Abstract.php中找到了以下内容

我可以做一个声明,说明是否定期付款然后重定向到xxxx.html,或者重定向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;
当然

我想你可以在其中任何一个上添加一个EventObserver

sales_order_save_before

然后执行if语句并在那里放置重定向

您可能还可以重写

public function saveOrderAction()

祝你好运

public function saveOrderAction()
Mage_Checkout_OnepageController