Skip to content

Commit

Permalink
Cannot create catagory's name with thai langauge magento#13689
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhagchand Saini committed Jan 18, 2020
1 parent c2e2646 commit fcdc291
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public function execute(\Magento\Framework\Event\Observer $observer)
$useDefaultAttribute = !empty($category->getData('use_default')['url_key']);
if ($category->getUrlKey() !== false && !$useDefaultAttribute) {
$resultUrlKey = $this->categoryUrlPathGenerator->getUrlKey($category);
if(empty($resultUrlKey)) {
//NOTE: If resultUrlKey not found due to entering category name in other language then use category name
$resultUrlKey = $category->getName();
}

$this->updateUrlKey($category, $resultUrlKey);
} elseif ($useDefaultAttribute) {
if (!$category->isObjectNew() && $category->getStoreId() === Store::DEFAULT_STORE_ID) {
Expand Down

0 comments on commit fcdc291

Please sign in to comment.