-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
#12450: Set Current Store from Store Code if isUseStoreInUrl #12529
Conversation
@@ -44,7 +44,9 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI | |||
|
|||
if ($store->isUseStoreInUrl()) { | |||
if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE) { | |||
$this->storeManager->setCurrentStore($storeCode); | |||
if ($storeCode !== '') { |
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.
There is } elseif (!empty($storeCode)) {
condition in the bottom, can the whole logic be simplified maybe?
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.
@orlangur finally I added setCurrentStore
from $store->getCode()
and I adjust tests for this logic
Thanks @orlangur I will make Backport for 2.3 in case my tests fail for same scenario. |
[EngCom] Public Pull Requests - 2.2-develop - MAGETWO-85311: Added namespace to product videos fotorama events #12469 #991 - MAGETWO-85300: 8437: Silent error when an email template is not found #970 - MAGETWO-85293: 12613: Verbiage Update Required: Product Image Watermark size Validation Message. #985 - MAGETWO-85286: 8176: LinkManagement::getChildren() does not include product visibility. #986 - MAGETWO-85285: 12482: Sitemap image links in MultiStore #935 - MAGETWO-84955: Set Current Store from Store Code if isUseStoreInUrl #12529 - MAGETWO-84764: NewRelic: Disables Module Deployments, Creates new Deploy Marker Command #12477 - MAGETWO-84439: 12180 Remove unnecessary use operator for Context, causes 503 error i… #12220
Set Current Store from Store Code
Description
If use Store Code in Url but for some reason is empty after process, set Store_Code from Store
Fixed Issues (if relevant)
Manual testing scenarios
{BASE_URL}/?
Contribution checklist