2

I am trying add code for redirect $this->resultRedirect->setPath('checkout/index/index#payment');

but some reason its take slash at the end of url so url become www.demo.com/checkout/index/index#payment/

which give me 404. if I pass www.demo.com/checkout/index/index#payment it work.

in-short I am getting addition slash at the end after parameter.

2
  • You might be getting JS error
    – Amit Bera
    Sep 12, 2018 at 11:06
  • @AmitBera No there is not any error as data is already pre-set in quote but i am getting 404 due to / at last www.demo.com/checkout/index/index#payment/
    – Kul
    Sep 12, 2018 at 11:08

1 Answer 1

3

Below code worked for me

 $this->_redirect('checkout', ['_fragment' => 'payment']);
1
  • Thank you Hitesh, this solved my same problem. One related thing though, is there a way to send an error message to the checkout/#payment? Tried with the MessageManager but doesn't do anything. Nov 3 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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