Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.3-develop] Add customer login url from Customer Url model to checkout config so … #12631

Merged
merged 8 commits into from Dec 20, 2017

Conversation

quisse
Copy link

@quisse quisse commented Dec 11, 2017

…it contains the referer url if necessary

Description

Use the url created in the customer model instead of creating a new one with the url builder. The current way isn't adding a referrer parameter when required

Fixed Issues (if relevant)

  1. Referer is not added to login url in checkout config #12627: Referer is not added to login url in checkout config

Manual testing scenarios

  1. Enable Redirect Customer to Account Dashboard after Logging in in the Magento backend.
  2. Retrieve the login url from the window.checkout object (key is customerLoginUrl)

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Dec 12, 2017
@dmanners dmanners changed the title Add customer login url from Customer Url model to checkout config so … [2.3-develop] Add customer login url from Customer Url model to checkout config so … Dec 13, 2017
@dmanners
Copy link
Contributor

Backport for #12630

@omiroshnichenko omiroshnichenko self-assigned this Dec 13, 2017
@@ -23,24 +23,24 @@ class ConfigProvider implements ConfigProviderInterface
/**
* @var UrlInterface
*/
protected $urlBuilder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must deprecate it instead of remove.

@@ -23,24 +23,24 @@ class ConfigProvider implements ConfigProviderInterface
/**
* @var UrlInterface
*/
protected $urlBuilder;
protected $customerUrl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New property must be private or public, in current case private.

* @param StoreManagerInterface $storeManager
* @param ScopeConfigInterface $scopeConfig
*/
public function __construct(
UrlInterface $urlBuilder,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Backward compatible development guide, you can't modify existing parameters. Add Url like optional parameter.

Copy link
Contributor

@omiroshnichenko omiroshnichenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, make this changes for all related PRs.

@quisse
Copy link
Author

quisse commented Dec 14, 2017

@omiroshnichenko Changes applied.

/**
* @param UrlInterface $urlBuilder
* @param StoreManagerInterface $storeManager
* @param ScopeConfigInterface $scopeConfig
* @param Url $customerUrl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$customerUrl also can be null.

) {
$this->urlBuilder = $urlBuilder;
$this->urlBuilder=$urlBuilder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spaces.

$this->storeManager = $storeManager;
$this->scopeConfig = $scopeConfig;
$this->customerUrl = $customerUrl ?? \Magento\Framework\App\ObjectManager::getInstance()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move ObjectManager to use instead of using fully qualified name.

@magento-team magento-team merged commit 57db07c into magento:2.3-develop Dec 20, 2017
magento-team pushed a commit that referenced this pull request Dec 20, 2017
@magento-engcom-team magento-engcom-team added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Progress: accept Release Line: 2.3 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants