Skip to main content

For Magento 2:

If you want to style or customize in success page after order success page redirectredirects to cart page.

Now solution is here:

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file, you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
     return $this->resultRedirectFactory->create()->setPath('checkout/cart');
 }

Just comment on this code and your problem is solvesolved. After comment this you dontdon't redirect to cart page.

For Magento 2:

If you want to style or customize in success page after order success page redirect to cart page.

Now solution is here:

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
     return $this->resultRedirectFactory->create()->setPath('checkout/cart');
 }

Just comment this code and your problem is solve. After comment this you dont redirect to cart page.

For Magento 2:

If you want to style or customize in success page after order success page redirects to cart page.

Now solution is here:

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file, you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
     return $this->resultRedirectFactory->create()->setPath('checkout/cart');
 }

Just comment on this code and your problem is solved. After comment this you don't redirect to cart page.

added 1 character in body
Source Link
Siarhey Uchukhlebau
  • 16.2k
  • 11
  • 55
  • 88

For Magento 2:

If you want to style or customize in success page after order success page redirect to cart page.

Now solution is here:

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
            return $this->resultRedirectFactory->create()->setPath('checkout/cart');
        }

Just comment this code and your problem is solve. After comment this you dont redirect to cart page.

Thanks

If you want to style or customize in success page after order success page redirect to cart page.

Now solution is here

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
            return $this->resultRedirectFactory->create()->setPath('checkout/cart');
        }

Just comment this code and your problem is solve. After comment this you dont redirect to cart page.

Thanks

For Magento 2:

If you want to style or customize in success page after order success page redirect to cart page.

Now solution is here:

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
     return $this->resultRedirectFactory->create()->setPath('checkout/cart');
 }

Just comment this code and your problem is solve. After comment this you dont redirect to cart page.

Source Link
Nikul
  • 1.3k
  • 4
  • 17
  • 26

If you want to style or customize in success page after order success page redirect to cart page.

Now solution is here

Go To vendor/magento/module-checkout/Controller/Onepage open Success.php File.

In this file you see Below Code

 if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
            return $this->resultRedirectFactory->create()->setPath('checkout/cart');
        }

Just comment this code and your problem is solve. After comment this you dont redirect to cart page.

Thanks