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
Conversation
…it contains the referer url if necessary
Backport for #12630 |
@@ -23,24 +23,24 @@ class ConfigProvider implements ConfigProviderInterface | |||
/** | |||
* @var UrlInterface | |||
*/ | |||
protected $urlBuilder; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
@omiroshnichenko Changes applied. |
/** | ||
* @param UrlInterface $urlBuilder | ||
* @param StoreManagerInterface $storeManager | ||
* @param ScopeConfigInterface $scopeConfig | ||
* @param Url $customerUrl |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
… model to checkout config so … #12631
…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)
Manual testing scenarios
Redirect Customer to Account Dashboard after Logging in
in the Magento backend.window.checkout
object (key is customerLoginUrl)Contribution checklist