0

While placing order I'm calling my custom saveOrderAction() where I'm saving order data.

Inside saveOrderAction(), I'm trying to call redirectAction() method where I want to fetch order information and redirect to paytm for payment.

Inside saveOrderAction() I've

  // redirectAction Call
                    if($response){
                        $this->_forward($action = 'redirectAction',
                            $controller = 'zigycheckout_index',
                            $module = 'Medex_ZigyCheckout',
                            $params = array('quote' => $checkoutSession->getQuote()));
                    }

which is not redirecting to redirectAction(). Also how I can fetch data in redirectAction() sent from saveOrderAction()? using $order_id = $this->getRequest()->getPost('quote'); ?

1
  • Please remove Action from $action = 'redirectAction' Jun 17 '15 at 6:56
1

Please try to do this way

$parameters =array('test1'=>'data1','test2'=>'data2');
$this->_forward('redirect',NULL,NULL,$parameters);


public function redirectAction()
{
    $first_data = $this->getRequest()->getParam('test1');
    $second_data = $this->getRequest()->getParam('test2');
    .........More Code.........
}

Thanks.

1

Try the below code,

$this->_forward($action = 'redirectAction',
         $controller = 'index',
         $module = 'zigycheckout',
         $params = array('quote' => $checkoutSession->getQuote()));
         }

The data is passed as parameters, so use the code as ,

$this->getRequest()->getParams('quote')
0

There issue in format of forward code: Try this;

$this->_forward( 'redirect,'index','Medex_ZigyCheckoutRouterterIndenfire',array('quote_Id'=>$checkoutSession->getQuote()->getId()));

You cannot send full object and suggest you send it quote id .

1
  • I tried $this->_forward('redirect','index','zigycheckout', array('quote_Id'=>$checkoutSession->getQuote()->getId())); but it didn't call that action.
    – amitshree
    Jun 17 '15 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.