Guest User

Untitled

a guest
Nov 21st, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
  3. <preference for="MagentoCustomerControllerAjaxLogin" type="Your_CompanyYour_ModuleControllerAjaxLogin" />
  4. </config>
  5.  
  6. if (!$this->getScopeConfig()->getValue('customer/startup/redirect_dashboard') && $redirectRoute) {
  7. $response['redirectUrl'] = $this->_redirect->success($redirectRoute);
  8. $this->getAccountRedirect()->clearRedirectCookie();
  9. }
  10.  
  11. $response['redirectUrl'] = $this->_redirect->success($this->_url->getUrl("customer/account"));
  12.  
  13. if (redirectUrl) {
  14. window.location.href = redirectUrl;
  15. } else if (response.redirectUrl) {
  16. window.location.href = response.redirectUrl;
  17. } else {
  18. location.reload();
  19. }
  20.  
  21. if (response.redirectUrl) {
  22. window.location.href = response.redirectUrl;
  23. } else if (redirectUrl) {
  24. window.location.href = redirectUrl;
  25. } else {
  26. location.reload();
  27. }
  28.  
  29. var config = {
  30. map: {
  31. '*': {
  32. 'Magento_Customer/js/action/login': 'YourCompany_YourModule/js/login'
  33. }
  34. }
  35. };
Add Comment
Please, Sign In to add comment