Merge pull request #6728 from papnoisanjeev/category-slug-local-based
category slug update for requested locale #6725
This commit is contained in:
commit
8fa224bb9b
|
|
@ -284,11 +284,13 @@ class CategoryRepository extends Repository
|
|||
|
||||
foreach ($attributeNames as $attributeName) {
|
||||
foreach (core()->getAllLocales() as $locale) {
|
||||
foreach ($model->translatedAttributes as $attribute) {
|
||||
if ($attribute === $attributeName) {
|
||||
$data[$locale->code][$attribute] = isset($data[$requestedLocale][$attribute])
|
||||
? $data[$requestedLocale][$attribute]
|
||||
: $data[$data['locale']][$attribute];
|
||||
if ($requestedLocale == $locale->code) {
|
||||
foreach ($model->translatedAttributes as $attribute) {
|
||||
if ($attribute === $attributeName) {
|
||||
$data[$locale->code][$attribute] = isset($data[$requestedLocale][$attribute])
|
||||
? $data[$requestedLocale][$attribute]
|
||||
: $data[$data['locale']][$attribute];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue