Skip to content

Commit

Permalink
Product collection data for the correct locale
Browse files Browse the repository at this point in the history
  • Loading branch information
royduin authored Nov 17, 2022
1 parent dbb95ec commit ca4131e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/RapidezStatamicServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function bootComposers() : self
{
if (config('statamic.get_product_collection_on_product_page')) {
View::composer('rapidez::product.overview', function (RenderedView $view) {
$entry = Entry::whereCollection('products')->where('sku', config('frontend.product.sku'))->first();
$entry = Entry::whereCollection('products')
->where('locale', config('rapidez.store_code'))
->where('sku', config('frontend.product.sku'))
->first();

$view->with('content', $entry);
});
}
Expand Down

0 comments on commit ca4131e

Please sign in to comment.