2

I have a controller where I created a redirect to checkout/#payment like this

$resultRedirect = $this->resultRedirectFactory->create();
    $resultRedirect->setPath('checkout/#payment');

    return $resultRedirect;

When I access the controller, it redirect me at the right path, but when the page it's almost done, it change the link into checkout/noroute/ and i recive 404.

Does anyone know why this happen?

1
  • This works, but it does not maintain the details of the checkout. It does not maintain the state. Do you know how to maintain state?
    – tread
    Apr 5, 2017 at 13:36

1 Answer 1

3

Try it like this:

$resultRedirect->setPath('checkout', ['_fragment'=>'payment']);
0

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.