0

My guest checkout is disable so while clicking to proceed to checkout from mini cart it shows a login popup.after login from this popup i want to redirect to checkout but it redirect to the same page first after login . Can any one help to redirect the site to checkout page after ajax login.

2
  • Then why you have kept guest checkout disable. Aug 14 '20 at 19:37
  • my requirement is quite like that i need to disable guest check out. But again need this while guest checkout is disable. Aug 17 '20 at 6:11
0

Please preference for Magento\Customer\Controller\Ajax\Login

replace -

$response['redirectUrl'] = $this->_redirect->success($redirectRoute); 

WITH

$response['redirectUrl'] = $this->_redirect->success($this->storeManager->getStore()->getUrl('onestepcheckout'));

and Also add

public function __construct(
  ....,
  \Magento\Store\Model\StoreManagerInterface $storeManager
 ) {
      ....
      $this->storeManager = $storeManager;
  }

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.