diff --git a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php index 47a960a87..839686fa7 100644 --- a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php @@ -153,7 +153,7 @@ class ContentRepository extends Repository 'content_type' => $content->content_type, ]); } - + return $formattedContent; } } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php index 9f6cbac7a..29f398256 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php @@ -136,7 +136,17 @@ 3 => [], 2 => [], ]; - $advertisement = json_decode($metaData->get('advertisement')->all()[0]->advertisement, true); + + $index = 0; + $currentLocale = request()->get('locale') ?: core()->getCurrentLocale(); + + foreach ($metaData->get('locale')->all() as $key => $value) { + if ($value->locale == $currentLocale) { + $index = $key; + } + } + + $advertisement = json_decode($metaData->get('advertisement')->all()[$index]->advertisement, true); @endphp @if(! isset($advertisement[4]))