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

WZ-4506:Fixed Category URL issue when there is multiple stores. #146

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

smit-kandiya
Copy link
Collaborator

No description provided.

@smit-kandiya smit-kandiya requested a review from alok0590 October 21, 2024 09:58
@smit-kandiya smit-kandiya force-pushed the WZ-4506 branch 3 times, most recently from ce589e6 to faac839 Compare October 22, 2024 07:26
$this->allStoreBaseUrls = $this->storeManager->getAllStoreBaseUrls();
}

$storeUrls = $this->allStoreBaseUrls;
Copy link
Member

Choose a reason for hiding this comment

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

    $storeUrls = $this->allStoreBaseUrls;

Simply us $this->allStoreBaseUrls

Not required

;
}

$currentStoreBaseUrl = $this->currentStoreBaseUrl[$this->storeId];
Copy link
Member

Choose a reason for hiding this comment

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

Check if

$this->currentStoreBaseUrl[$this->storeId] and isset($this->currentStoreBaseUrl[$this->storeId]['base_url'])

}
}

$categoryUrl = $currentStoreBaseUrl."".$categoryUrl;
Copy link
Member

Choose a reason for hiding this comment

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

What if we did not find any URL and replaced it? Only append $currentStoreBaseUrl in the if condition above. And only if $currentStoreBaseUrl is set or not null

@alok0590 alok0590 merged commit 2f2536e into dev Dec 23, 2024
2 checks passed
@alok0590 alok0590 deleted the WZ-4506 branch December 23, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants