Skip to content

Commit

Permalink
Use the current site instead of the selected site (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmeijer97 authored Jan 2, 2024
1 parent 69526b3 commit 245c807
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Models/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected static function booting()
})
->leftJoinSub($renamedStore, 'store_value', function ($join) {
$join->on('store_value.sub_option_id', '=', 'eav_attribute_option.option_id')
->where('store_value.store_id', Site::selected()->attributes['magento_store_id']);
->where('store_value.store_id', Site::current()->attributes['magento_store_id']);
})
->where('attribute_id', config('rapidez.statamic.runway.brand_attribute_id'));
});
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Category extends Model

public function getTable()
{
return 'catalog_category_flat_store_'.Site::selected()->attributes['magento_store_id'];
return 'catalog_category_flat_store_'.Site::current()->attributes['magento_store_id'];
}
}
2 changes: 1 addition & 1 deletion src/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ protected static function booting()

public function getTable()
{
return 'catalog_product_flat_'.Site::selected()->attributes['magento_store_id'];
return 'catalog_product_flat_'.Site::current()->attributes['magento_store_id'];
}
}

0 comments on commit 245c807

Please sign in to comment.